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 2018/01/08 08:55:39 UTC

docValues with stored and useDocValuesAsStored

What is the precedence when docValues with stored=true is used?
e.g.
<field name="lang" type="string" indexed="true" stored="true" docValues="true" />

My guess, because of useDocValuesAsStored=true is default, that stored=true is
ignored and the values are pulled from docValues.

And only if useDocValuesAsStored=false is explicitly used then stored=true comes
into play.

Or short, useDocValuesAsStored=true (the default) has precedence over stored=true.
I this right?

Regards
Bernd

Re: docValues with stored and useDocValuesAsStored

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Hi Bernd,

If Solr can fetch a field from both stored and docValues then it
chooses docValues only if such field is single-valued and that allows
Solr to avoid accessing the stored document altogether for *all*
fields to be returned. Otherwise stored values are preferred. This is
the behavior since 7.1+

On Mon, Jan 8, 2018 at 2:25 PM, Bernd Fehling
<be...@uni-bielefeld.de> wrote:
> What is the precedence when docValues with stored=true is used?
> e.g.
> <field name="lang" type="string" indexed="true" stored="true" docValues="true" />
>
> My guess, because of useDocValuesAsStored=true is default, that stored=true is
> ignored and the values are pulled from docValues.
>
> And only if useDocValuesAsStored=false is explicitly used then stored=true comes
> into play.
>
> Or short, useDocValuesAsStored=true (the default) has precedence over stored=true.
> I this right?
>
> Regards
> Bernd



-- 
Regards,
Shalin Shekhar Mangar.