Now that you know the basics of indexing, how to use the built-in and custom analyzers, how to create mapping, and index new documents, let's see how to query your indexed documents in Elasticsearch.
Elasticsearch supports various query types with its Query DSL by posting a JSON-based query in the POST
request body.
It is beyond the scope of this book to discuss the minute details of each query type and its configurable options. I would highly recommend that you try these queries out with different options and data to understand the query behaviors better. You can use the small dataset script provided at https://raw.githubusercontent.com/vishalbrevitaz/eshadoop/master/ch03/data/setup-hrms.sh to try out the queries mentioned in the following sections.