Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive

Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive

Buckets inside Buckets

Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Let’s take a look at the response.
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive

One Final Modification

Let’s add two metrics to calculate the in and max price for each make:
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_driveWhich gives us the following output:
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive
Elasticsearch The Definitive Guide Chapter Part IV Aggregations 26 AggregationTest_drive