When to use DocValues in Solr

Question - For which fields in my schema should I use DocValues on?


Answer - Any field which is used for sorting, faceting, or is part of a custom scoring function one should use the DocValues feature by enabling it in the schema.xml file.

Here is an example rating field on which the sort option is provided to the user, with DocValues enabled to make it more efficient.

<field name="rating" type="tint" indexed="true" docValues="true" />


For more information on DoValues you could refer to the reference guide here - https://cwiki.apache.org/confluence/display/solr/DocValues

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk