Executing a significant terms aggregation
Significant terms aggregation is an evolution of the previous one, in that it’s able to cover several scenarios, such as the following:
- Suggesting relevant terms related to current query text
- Discovering relations between terms
- Discovering common patterns in text
In these scenarios, the result must not be as simple as the previous terms aggregations; it must be computed as a variance between a foreground set (generally the query) and a background one (a large bulk of data).
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 the commands, any HTTP client can be used, such as cURL (https://curl.haxx.se/), Postman (https://www.getpostman.com/), or similar. Using Kibana Console is recommended, as it provides code completion and better character escaping for Elasticsearch.
To...