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 vishal patel <vi...@outlook.com> on 2019/05/22 07:51:21 UTC

Usage of docValuesFormat

We enabled the DocValues on some schema fields for sorting and faceting query result.
Is it necessary to add docValuesFormat for faster query process?
Which one should better? docValuesFormat="Memory" or docValuesFormat="Disk"?

Note: Our indexed data size are high in one collection and different sort and faceting queries are executed within a second.

Sent from Outlook<http://aka.ms/weboutlook>

Re: Usage of docValuesFormat

Posted by Erick Erickson <er...@gmail.com>.

> On May 22, 2019, at 12:51 AM, vishal patel <vi...@outlook.com> wrote:
> 
> We enabled the DocValues on some schema fields for sorting and faceting query result.
> Is it necessary to add docValuesFormat for faster query process?

Only if you sort/facet or group. And queries won’t necessarily be faster after warmup. If you don’t have docValues enabled, the “uninverted” structure is created on the Java heap at query time. If you do have docValues enabled, the “uninverted” structure is serialized to disk at index time, and just read at query time in to the OS memory cache, NOT the Java heap.

If you don’t sort/facet or group, docValues do you no good at all.

We strongly recommend that if you sort/group or facet you use docValues. In fact, there’s a flag you can set in 8x that will throw an error if you do those operations on a field that does _not_ have docValues set.

docValues have no effect on the part of the query that don’t group, facet or sort.

> Which one should better? docValuesFormat="Memory" or docValuesFormat="Disk”?

The docValuesFormat is obsolete and no longer supported at all as of 8.0.

> Note: Our indexed data size are high in one collection and different sort and faceting queries are executed within a second.
> 
> Sent from Outlook<http://aka.ms/weboutlook>

Best,
Erick