Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Elasticsearch  Indexing

You're reading from   Elasticsearch Indexing How to Improve User's Search Experience

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781783987023
Length 176 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Huseyin Akdogan Huseyin Akdogan
Author Profile Icon Huseyin Akdogan
Huseyin Akdogan
Arrow right icon
View More author details
Toc

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 from the disk. This operation is called segment merging. It is executed as asynchronous and automatically processes in the background while you are indexing and searching. Segment merging operation saves system resources as well as disk space because...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime