【发布时间】:2018-01-06 02:02:52
【问题描述】:
当我在 ElasticSearch 5.5 中执行以下聚合查询时,“[必须] 查询格式错误,查询名称后没有 start_object”。任何想法?
curl -XGET 'localhost:9200/car/car/_search?pretty' -H 'Content-Type: application/json' -d'
{
"query": {
"bool": {
"must": { "match": { "car_color": "Yellow" } }
}
},
"aggregations": {
"all_cars": {
"global": {},
"aggregations": {
"car_makes": {
"filter": {
"must": [
{
"terms": {"car_color": ["Yellow"]}
}
]
},
"aggregations": {
"filtered_car_make": {
"terms": {"field": "car_make"}
}
}
}
}
}
}
}
'
【问题讨论】:
标签: elasticsearch