Solr中存储的vs docvalues的优先级

发布于 2025-02-04 20:38:38 字数 171 浏览 4 评论 0原文

如果我设置了stopored = true and docValues = true对于给定字段,则如下,

Solr选择的优先级是什么?就像在ID字段上进行排序/方面的操作一样,它将从DocValues检索该值,并且如果我执行返回ID字段的正常搜索查询,它将从存储的字段返回?

请帮助我澄清这一点。

If I have set both stored=true and docValues=true for a given field as follows,

what would be the precedence chosen by solr? As in, is it like, if I am doing a sort/facet operation on the id field, the value will be retrieved from docValues and if I am executing a normal search query which returns id field, it will be returned from stored field ?

Please help me to clarify this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

折戟 2025-02-11 20:38:38

存储的值除了将值返回给客户端以外的任何内容 - 即,将其发送到SOLR时为字段提交了什么值。因此,是的,如果您执行搜索(或者在中返回到客户端的任何结果),则读取并返回存储的值。

docvalues在Lucene中实现了一项实际功能,该功能使某些操作更有效(例如您提到的分类和方面)。它们是较低级别的功能,您并没有真正“查看”基础存储的Docvalues。

我猜想您会感到困惑这些值,因为对“将DOC值作为存储值”的支持支持;在某些情况下,存储在DocValue中的值将与用户提交的值相同(例如,对于整数字段),因此,如果Lucene已经读取并使用了DocValue,并且它与存储的值兼容,那么您可以告诉它也可以跳过获取存储的值 - 保存读取。

stored values aren't used for anything other than returning the value to the client - i.e. what value was submitted for the field when it was sent to Solr. So yes, if you perform a search (or anything that results in a document being returned to the client), the stored value is read and returned.

docValues implements an actual feature in Lucene that makes certain operations more effective (such as sorting and faceting as you've mentioned). They're a lower level feature, and you don't really "see" the underlying stored docvalues.

I'm guessing you're confusing these values since there's support for "use doc values as stored value"; in certain cases the value stored in a docvalue will be the same as the same as what the user submitted (for example for integer fields), so if Lucene has already read and used the docvalue - and it is compatible with the stored value, you can tell it to skip fetching the stored value as well - saving a read.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文