O'Reilly logo

Mastering Elasticsearch 5.x - Third Edition by Bharvi Dixit

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

Segment merging under control

Lucene segments are written once and read many times, and data structures, apart from the information about the deleted documents that are held in one of the files, can be changed. After some time, when certain conditions are met, the contents of some segments can be copied to a bigger segment, and the original segments are discarded and thus deleted from the disk. Such an operation is called segment merging.

You may ask yourself, why bother about segment merging? There are a few reasons. First of all, the more segments the index is built from, the slower the search will be and the more memory Lucene will need. In addition to this, segments are immutable, so the information is not deleted from them. If you happen to ...

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