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/query3c.http

36 lines
No EOL
697 B
HTTP

GET /restaurants/_search
{
"size": 0,
"query": {
"geo_distance": {
"distance": "9000km",
"location": {
"lat": 28.642449499999998,
"lon": 77.10684570000001
}
}
},
"aggs": {
"city_term": {
"terms": {
"field": "ratingText.keyword",
"size": 10000,
"shard_size": 10000
},
"aggs": {
"max_vote_count": {
"max": {
"field": "votes"
}
},
"max_vote_bucket_sort": {
"bucket_sort": {
"sort": [
{ "max_vote_count": { "order": "desc" } }
]
}
}
}
}
}
}