Solr docValues用法 [英] Solr docValues usage

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

问题描述

我计划尝试使用Solr的docValues来改善构面和排序性能。我对此功能有一些疑问:

I am planning to try Solr's docValues to hopefully improve facet and sort performance. I have some questions around this feature:


  1. 如果启用了docValues,Solr除了创建单独的索引外还将创建前向索引(用于构面)反向索引(用于搜索)?还是Solr仅会创建一个前向索引? (因此,通过在分面中获得性能提升来换取搜索中的性能损失)

  2. 如果我想在一个字段中同时进行分面和搜索,那么最佳实践是什么?我应该在同一字段中设置 indexed = true和 docValues = true,还是创建一个副本字段,其中源字段的索引值为true,而目标字段的值为docValues = true? (即,优化源字段以进行搜索,而目的字段进行分面;甚至需要这样做?)

  3. 以下文档页面:即使该字段是单值构面字段,也为 true 。我有点困惑-这仅适用于将与docvalues一起使用的复制字段(目标)还是对非复制字段也适用?

  1. If I enable docValues, will Solr create a forward index (for faceting) in addition to a separate reverse index (for searching)? Or will Solr simply create a forward index ONLY? (thus, resulting to performance gain in faceting in exchange for performance loss in searching)
  2. If I want to both facet and search in a single field, what is the best practice? Should I set "indexed=true" and "docValues=true" in the same field or should I create a copy field where the source field has indexed=true while the destination field has docValues=true? (i.e. optimize the source field for search while the dest field for faceting; is this even needed?)
  3. The following documentation page from Datastax states: "for faceting to use docValues, the schema needs to specify multiValued="true" even if the field is a single-value facet field". I'm a bit confused - is this only true for copy fields (dest) that are to be used with docvalues or is this true even for non-copy fields?

我正在使用Datastax Enterprise 4.5.2

I am using Datastax Enterprise 4.5.2

推荐答案

Solr faceting实现将仅使用DocValues如果它们被标记为多值,那么除非您的字段实际上是多值的,否则我建议使用非存储的复制字段,其值为multiValued = true和docValues = true,以避免将您的单值字段存储为Cassandra列表/设置。

Solr faceting implementation will make use of DocValues only if they're marked as multivalued, so unless your field is actually multivalued, I'd suggest to use a non-stored copy field with multiValued=true and docValues=true, to avoid storing your single-value field as a Cassandra list/set.

这篇关于Solr docValues用法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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