In this chapter, we will see queries that are used for searching text and numeric values. They are simpler and the most common ones that are used in Elasticsearch. The first part of the chapter covers the text queries from the simple term and terms query to the complex query string query. We'll understand how the queries are strongly related to mapping for choosing the correct query based on mapping.
In the last part of this chapter, we will see many special query that covers 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 prefix query
- Using a wildcard query
- Using a regexp query
- Using span queries
- Using a match query
- Using a query string query
- Using a simple query string query
- Using the range query
- The common terms...