当将通配符筛选应用于带状区域时,我仍然得到与过滤器不匹配的桶键.
"aggregations": {
"test": {
"filter": {
"wildcard": {
"name.shingles": {
"value": "*red*"
}
}
},
"aggs": {
"shingles": {
"terms": {
"field": "name.shingles",
"size": 3
}
}
}
}
}结果(期望只有第一个桶,因为它包含“红色”):
"aggregations" : {
"test" : {
"doc_count" : 7,
"shingles" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 57,
"buckets" : [
{
"key" : "turning red",
"doc_count" : 3
},
{
"key" : "aces of",
"doc_count" : 2
},
{
"key" : "aces of the",
"doc_count" : 2
}
]
}
}发布于 2022-06-29 08:17:50
请包括您的索引映射和数据样本,没有这是不可能回答您的问题。一些提示:"name.shingles“是”关键字“还是”文本“。如果它的“文本”你的过滤器不能工作,因为字段将被分析?
https://stackoverflow.com/questions/72797593
复制相似问题