Book Image

Elasticsearch Indexing

By : Huseyin Akdogan
Book Image

Elasticsearch Indexing

By: Huseyin Akdogan

Overview of this book

Beginning with an overview of the way ElasticSearch stores data, you’ll begin to extend your knowledge to tackle indexing and mapping, and learn how to configure ElasticSearch to meet your users’ needs. You’ll then find out how to use analysis and analyzers for greater intelligence in how you organize and pull up search results – to guarantee that every search query is met with the relevant results! You’ll explore the anatomy of an ElasticSearch cluster, and learn how to set up configurations that give you optimum availability as well as scalability. Once you’ve learned how these elements work, you’ll find real-world solutions to help you improve indexing performance, as well as tips and guidance on safety so you can back up and restore data. Once you’ve learned each component outlined throughout, you will be confident that you can help to deliver an improved search experience – exactly what modern users demand and expect.
Table of Contents (15 chapters)
Elasticsearch Indexing
About the Author
About the Reviewer

Optimization of mapping definition

If your search requirements allow it, there are some tips for optimization in the mapping definition of your index for when you need to improve the indexing performance. In the following section, we will look at those tips.


Scoring is the process of calculating the score of a document in the scope of a particular query and is an important part of the query process in Lucene. The score indicates how well the document matches the query. In other words, it is a factor that shows how close the document you are looking for. This means, the higher the score, the more relevant the document. There are several factors that are a determinant in calculating the score. One of them is the norms.

Lucene takes field length into account for the default relevance calculation. When a searched term is found in a short field (content length is short), Lucene thinks it is more likely that the content of that field is about the term than if the same term contains in a long...