This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
va/Assignment2_part1/queries/query3b.http

38 lines
699 B
Text
Raw Permalink Normal View History

2023-04-24 10:09:43 +00:00
GET /restaurants/_search
{
"size": 0,
"query": {
"range": {
"votes": {
"gte": 100
}
}
},
"aggs": {
"city_term": {
"terms": {
"field": "city.keyword",
"size": 10000,
"shard_size": 10000,
"min_doc_count": 10,
"order": { "_count": "desc" }
},
"aggs": {
"avg_price": {
"avg": {
"field": "averageCostForTwo"
}
},
"avg_price_bucket_sort": {
"bucket_sort": {
"sort": [
{ "avg_price": { "order": "desc" } }
],
"size": 7
}
}
}
}
}
}