Chapter 6. Text and Numeric Queries

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 query
  • Using IDs query
  • Using the function score query
  • Using the exists query
  • Using the template query

Introduction

In this chapter, we will see queries that are used for searching text and numeric values. They are simpler and the most common ones to be 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 the mapping for choosing the correct query based on mapping.

In the last part of the chapter, we will see some special query that covers fields, helpers for building complex queries from strings, and query templates.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.107.81