“匹配所有文档"中的结果如何在 solr 中排序?询问 [英] How are results ordered in solr in a "match all docs" query

查看:17
本文介绍了“匹配所有文档"中的结果如何在 solr 中排序?询问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用匹配所有文档"查询时,'*:*',星号冒号星号,结果如何排序?

When I use a "match all docs" query, '*:*', asterisk colon asterisk, how are the results ordered?

我认为它们是按相关性排序的,但在这种情况下相关性是相等的,对吗?那么,方案是什么?

I presume they get ordered by relevancy, but the relevancy is equal in this case, right? So then, what's the scheme?

推荐答案

当两个文档的分数相同时,Lucene 会按照索引顺序(第一个已被索引的)对它们进行排序,以便运行两次查询返回在相同的顺序.

When two documents have the same score, Lucene sorts them by index order (the first which has been indexed first) so that running a query twice returns documents in the same order.

由于 MatchAllDocsQuery 给出所有文档的一个恒定分数,它按索引顺序返回它们.

Since MatchAllDocsQuery gives a constant score to all documents, it returns them in index order.

这篇关于“匹配所有文档"中的结果如何在 solr 中排序?询问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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