简体   繁体   中英

Solr docValues usage

I am planning to try Solr's docValues to hopefully improve facet and sort performance. 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)? 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? (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 ". 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?

I am using Datastax Enterprise 4.5.2

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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