ElasticSearch numerical values can be used to process histogram data. The histogram representation is a very powerful way to show data to end users.
You need a working ElasticSearch cluster and an index populated with the script (chapter_06/executing_histogram_aggregations.sh
) available at https://github.com/aparo/elasticsearch-cookbook-second-edition.
Using the items populated with the script, we want to calculate aggregations on:
Age with an interval of 5 years
Price with an interval of 10$
Date with an interval of 6 months
To execute histogram aggregations, we will perform the steps given as follows: