简体   繁体   English

Solr docValues用法

[英]Solr docValues usage

I am planning to try Solr's docValues to hopefully improve facet and sort performance. 我打算尝试使用Solr的docValues来改善构面和排序性能。 I have some questions around this feature: 我对此功能有一些疑问:

  1. If I enable docValues, will Solr create a forward index (for faceting) in addition to a separate reverse index (for searching)? 如果启用docValues,Solr会在创建单独的反向索引(用于搜索)的同时创建正向索引(用于构面)吗? Or will Solr simply create a forward index ONLY? 还是Solr仅会创建一个前向索引? (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? 我应该在同一字段中设置“ indexed = true”和“ docValues = true”,还是创建一个副本字段,其中源字段的索引值为true,而目标字段的值为docValues = true? (ie 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 ". 来自Datastax的以下文档页面指出:“ 要使用docValues进行构面,即使该字段是单值构面字段,架构也需要指定multiValued =“ true ”。 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? 我有点困惑-这仅适用于将与docvalues一起使用的复制字段(目标),还是什至适用于非复制字段?

I am using Datastax Enterprise 4.5.2 我正在使用Datastax Enterprise 4.5.2

Solr构面实现仅在将DocValues标记为多值时才使用DocValues,因此,除非您的字段实际上是多值的,否则我建议使用multiValued = true和docValues = true的非存储副本字段,以避免存储您的单值字段作为Cassandra列表/集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM