Elasticsearch是不确定的吗? [英] Is elasticsearch non-deterministic?

查看:81
本文介绍了Elasticsearch是不确定的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于查询的计算分数算法,elasticsearch每次执行查询时都不会以相同的顺序返回相同的结果吗?或者是别的什么?有没有一种方法可以使每次执行查询时以相同的顺序返回结果?这正常吗?

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?

推荐答案

这可能与弹性搜索默认情况下本地计算相关性分数的方式有关.

This might to do with the way elastic search calculates relevancy scores locally by default.

尝试添加:

&search_type=dfs_query_then_fetch

查询,看看是否有帮助.这告诉ES在整个集群中计算分数.

to your query and see if that helps. This tells ES to calculate scores across the whole cluster.

更多信息:

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

这篇关于Elasticsearch是不确定的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆