Summary

In this chapter, we explained scoring and its new default similarity ranking algorithm, BM25, along with explaining the difference between BM25 and TF-IDF, the previous ranking algorithm used in Apache Lucene. In addition to that, we discussed precision and recall, the fundamentals of search relevancy.

After that, we discussed Elasticsearch Query DSL in detail and covered the important queries with their use cases. We also saw the new bool query syntax and how one can use filters within the query context of the bool query. The chapter also covered a detailed discussion about using query rewrites and using search templates along with the Mustache template engine.

In the next chapter, you will learn about query rescoring and how search works ...

Get Mastering Elasticsearch 5.x - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.