Executing significant terms aggregation
This kind of aggregation is an evolution of the previous one in that it's able to cover several scenarios such as:
Suggesting relevant terms related to current query text
Discovering relations of terms
Discover common patterns in text
In these scenarios cases, 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 2, Downloading and Setup.
To execute curl
via the command line, you need to install curl
for your operative system.
To correctly execute the following command, you need an index populated with the script (chapter_08/populate_aggregations.sh
) available in the online code.
How to do it...
For executing a significant term aggregation, we will perform the following steps...