In the previous recipe, we learned how to build queries. In this recipe, we will execute a query to retrieve some documents.
Executing a standard search
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.
A Maven tool or an IDE that natively supports it for Java programming, such as Eclipse or IntelliJ IDEA, must be installed.
The code for this recipe is in the ch13/high-level-client directory and the referred class is the QueryExample.