我的搜索索引中有 98 个文档。当我在没有过滤器的情况下进行构面搜索时,构面计数与该术语的索引中的项目数不匹配。如果我将构面集设置为等于当前文档数 98,则会返回构面计数以及该术语的正确项目数。下面是用于构面搜索的 json。
不返回正确数量的项目
{
"facets": {
"brand": {
"terms": {
"field": "brand",
"all_terms": true
}
},
"global": true
}
}
是否返回正确数量的项目
{
"facets": {
"brand": {
"terms": {
"field": "brand",
"all_terms": true,
"size": 98
}
},
"global": true
}
}