5

Does elasticsearch does not return the same results in the same order every time a query is executed because of its algorithm in calculating the score? Or is it something else? Is there a way to make it such that the results return in the same order everytime a query is executed? Is this normal?

4

1 回答 1

5

这可能与弹性搜索默认在本地计算相关性分数的方式有关。

尝试添加:

&search_type=dfs_query_then_fetch

到您的查询,看看是否有帮助。这告诉 ES 计算整个集群的分数。

更多信息:

http://www.elasticsearch.org/blog/understanding-query-then-fetch-vs-dfs-query-then-fetch/

于 2013-08-07T06:36:04.063 回答