lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: DOcValues
Date Fri, 03 Apr 2015 13:26:42 GMT
On 4/3/2015 6:53 AM, Tomoko Uchida wrote:
> According to line 430 in (Solr 5.0.0), facet method is
> forced to "fc" when we set docValues=true.
> So we need not set facet.method to use doc values. Even if we specify
> facet.method=enum, it might be ignored.
> If my understanding is wrong, please correct that.

That code certainly looks like facet.method=enum is ignored when
docValues are present.

As I understand it, the only disadvantage to facet.method=fc (when
docValues are not present) is that it uses a lot of heap memory in the
FieldCache (or whatever replaces FieldCache in 5.0).  That memory
structure makes subsequent facets much faster, but on a large index, the
memory required can be astronomical.  The enum method skips that
caching, relying on the operating system to cache the data in the index
itself.  If there's enough memory for good OS caching, enum can be
almost as fast as fc, with a much smaller Java heap.

On a field with docValues, the large memory structure is not required,
and an optimized code path is used.  Based on the comment in the java
code that you highlighted, it sounds like only fc will do docValues, but
no handling is present for the fcs method with docValues, which would
seem to contradict that comment a little bit.


View raw message