For queries based on nested objects, as we saw in Chapter 2, Managing Mapping, there is a special nested query. This kind of query is required because nested objects are indexed in a special way in Elasticsearch.
Using nested queries
Getting ready
You need an up and running Elasticsearch installation, as we described in the Downloading and installing Elasticsearch recipe in Chapter 1, Getting Started.
To execute these commands, any HTTP client can be used, such as curl (https://curl.haxx.se/), Postman (https://www.getpostman.com/), or similar. I suggest using the Kibana console, as it provides code completion and better character escaping for querying text.
To correctly execute the following commands, you...