0
我想运行一个弹性查询使用_count来计数。弹性搜索以获得个人条款计数
{
"query": {
"bool": {
"must": [ {
"term": {
"A": "image"
}
},
{
"aggs" : {
"C" : {
"terms" : { "field" : "C" ,
"include" : ["X:969", "Y:96"]
}
}
}
}
]
}
}
}
现在我得到预期的输出。
{
"count": 321,
"_shards": {
"total": 19,
"successful": 19,
"failed": 0
}
}
但反正是有得到的输出喜欢
X:969 count 2
Y:96 count 319
基本上找个别情况,而不是即使当数组传递总数。
问候。
谢谢,我如何通过此阵“条款”:{“场”:“C”}我尝试通过它在[],但失败 – user2854333
请添加新的查询作为问题的一部分? – Mysterion
已更新查询 – user2854333