我有一个非常基本的top_hits聚合,但是如果结果集中的命中次数过多,则表现不佳(与返回大约一百次命中的平均命中集的搜索相比,这是另外一秒左右)。这是查询。
{
"aggs": {
"hits": {
"aggs": {
"children": {
"top_hits": {
"_source": "preview",
"size": 3
}
},
"top_score": {
"max": {
"script": "_score"
}
}
},
"terms": {
"field": "rollupId",
"size": 10,
"order": {
"top_score": "desc"
}
}
}
},
"query": {
"multi_match": {
"query": "states",
"fields": [
"title^3",
"nameText^2.5",
"placeText^2",
"allText"
],
"type": "cross_fields",
"operator": "and"
}
},
"from": 0,
"size": 0
}
我只想要10个结果,每个结果只有3次点击。为什么这么慢?