Solr docValues usage

无人久伴 提交于 2019-12-06 12:58:20

问题


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? (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?

I am using Datastax Enterprise 4.5.2


回答1:


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.



来源:https://stackoverflow.com/questions/26495208/solr-docvalues-usage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!