O'Reilly logo

Elasticsearch Indexing by Hüseyin Akdoğan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Segments and merging policies

A Lucene index is composed of smaller chunks that are called segments. In other words, a segment is a section of an index. Each segment is a fully independent index. A new segment can be created when a new document is added or, in the automatic refresh process, it occurs every second by default in Elasticsearch. Each segment consumes system resources (that is, memory, CPU cycles, and so on) and, besides, every segment is checked at search time. This means that if there are more segments, they will be searched and there will be more memory usage. For these reasons, increasing the number of segments is a problem. Small segments are copied to the bigger segment to solve this problem, and the copied segments are deleted ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required