【Elasticsearch】elasticsearch 段 segment 段合并

在这里插入图片描述

1.概述

1.1 Segment是什么?

每个分片包含多个segment(段),每一个segment都是一个倒排索引

在查询的时,会把所有的segment查询结果汇总归并后最为最终的分片查询结果返回

  1. segment是不可变的,物理上你并不能从中删除信息,所以在删除文档的时候,是在文档上面打上一个删除的标记,然后在执行段合并的时候,进行删除

  2. 索引segment段的个数越多,搜索性能越低且消耗内存更多

2.段合并

Force Merge

The force merge API allows to force merging of one or more indices through an API. The merge relates to the number of segments a Lucene index holds within each shard. The force merge operation allows to reduce the numbe

猜你喜欢

转载自blog.csdn.net/qq_21383435/article/details/108988112
今日推荐