使用过滤查询*:* 时,Solr 默认如何排序? [英] How does Solr sort by default when using filter query *:*?

查看:23
本文介绍了使用过滤查询*:* 时,Solr 默认如何排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前的页面设置没有应用过滤器/方面/查询.它是所有内容的列表(使用寻呼机).过滤器查询类似于 *:*(来自任何字段的任何内容).

We currently have a page setup that has no filters/facet/queries applied. It is a listing of all content (using a pager). The filter query is something like *:* (anything from any field).

我不知道内容是如何排序的.它说是相关性",但是当您选择所有内容时,这意味着什么?

I can't figure out how the content is being sorted though. It says it's by "relevancy", but what does that mean when you're selecting everything?

我做了一些快速测试.它似乎没有按内容修改日期或进入索引的日期排序.

I did some quick testing. It does not appear to be sorted by the date the content is modified, or entered into the index.

推荐答案

查询*:*也称为一个 MatchAllDocsQuery.根据 SO 问题 结果如何在 solr 中匹配所有文档"中排序查询 它将按照文档存储在索引中的相同顺序返回文档.

Querying for *:* is also called a MatchAllDocsQuery. According to the SO question How are results ordered in solr in a "match all docs" query it will return the docs in the same order as they were stored in the index.

请注意,如果您更新现有文档,它会被删除并重新创建.因此,它会出现在此类搜索的末尾.

Be aware that if you update an existing document, it get's deleted and recreated. As such it would appear at the end of such a search afterwards.

我知道在 Lucene 的 Nabble 中有(至少)两个线程很有趣

There are (at least) two threads in Lucene's Nabble I am aware of that are interesting on this topic

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