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

39 lines
682 B
Text
Raw Permalink Normal View History

2023-04-24 10:09:43 +00:00
GET /restaurants/_search
{
"size": 0,
"query": {
"bool": {
"must": [
{
"match": {
"ratingText": "Good"
}
}
]
}
},
"aggs": {
"votes_ranges": {
"range": {
"field": "votes",
"ranges": [
{ "from": 0, "to": 250 },
{ "from": 250, "to": 500 },
{ "from": 500, "to": 750 },
{ "from": 750, "to": 1000 }
]
},
"aggs": {
"min_cost": {
"min": {
"field": "averageCostForTwo"
}
},
"max_cost": {
"max": { "field": "averageCostForTwo" }
}
}
}
}
}