Chapter 5: Text and Numeric Queries

In this chapter, we will examine the queries that are used for searching text and numeric values. They are simple and the most common ones used in Elasticsearch. The first part of this chapter covers the text queries from the simple term and terms query to the complex query string query. We'll gain an understanding of how the queries are strongly related to mapping when it comes to choosing the correct query based on mapping.

In the last part of this chapter, we will look at many special queries that cover fields, helpers for building complex queries from strings, and query templates.

In this chapter, we will cover the following recipes:

  • Using a term query
  • Using a terms query
  • Using a terms set query
  • Using ...

Get Elasticsearch 8.x Cookbook - Fifth 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.