In 这个问题 https://github.com/elasticsearch/elasticsearch/issues/1170#issuecomment-4587811是使用可选种子进行排序的功能请求,允许重新创建随机顺序。
我需要能够对随机排序的结果进行分页。
Elasticsearch 0.19.1 如何做到这一点?
Thanks.
这应该比上面的两个答案要快得多并且支持播种:
curl -XGET 'localhost:9200/_search' -d '{
"query": {
"function_score" : {
"query" : { "match_all": {} },
"random_score" : {}
}
}
}';
See: https://github.com/elasticsearch/elasticsearch/issues/1170 https://github.com/elasticsearch/elasticsearch/issues/1170
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)