You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bernd Fehling <be...@uni-bielefeld.de> on 2013/04/08 09:15:47 UTC

solr 4.2.1 and docValues

Hi list,

I want to try docValues for my facets and sorting with solr 4.2.1
and have already seen many papers, examples and source code about
and around docValues, but there are still some questions.

The example schema.xml has fields:
<field name="popularity" type="int" indexed="true" stored="true" />
<field name="manu_exact" type="string" indexed="true" stored="false"/>

and it has a comment for docValues:
<!--
Some fields such as popularity and manu_exact could be modified to
leverage doc values:
<field name="popularity" type="int" indexed="true" stored="true" docValues="true" default="0" />
<field name="manu_exact" type="string" indexed="false" stored="false" docValues="true" default="" />
...
-->

For popularity with docValues indexed and stored are true and default is "0".
For manu_exact with docValues indexed and stored are false and default is an empty string.

Questions:
- if docValues is true will this replace indexed=true as for field manu_exact?

- what is the advantage of having indexed=true and docvalues=true?

- what if default="" also for the popularity int field?

Regards
Bernd

Re: solr 4.2.1 and docValues

Posted by Chris Hostetter <ho...@fucit.org>.
: Questions:

: - what is the advantage of having indexed=true and docvalues=true?

indexed="true" and docValues="true" are orthoginal.  it might make sense 
to use both if you wnated to do term queries on the field but also 
faceting -- because indexed tems are generally faster for queries, but 
docvalues may be faster for faceting if you index is changing rapidly.

: - what if default="" also for the popularity int field?

that would not be legal since "" is not a valid int value.

http://wiki.apache.org/solr/DocValues


-Hoss