docValues with stored and useDocValuesAsStored

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

docValues with stored and useDocValuesAsStored

Bernd Fehling
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
Reply | Threaded
Open this post in threaded view
|

Re: docValues with stored and useDocValuesAsStored

Shalin Shekhar Mangar
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
<[hidden email]> 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.