By and large, don't use the enum method unless there are _very_
few unique values. It forms a filter (size roughly mixDoc/8 bytes)
for _every_ unique value in the field, i.e. if you have 10,000 unique
values it'll try to form 10,000 filterCache entries. Let the system
do this for you automatically if appropriate.

Best,
Erick

On Tue, Dec 23, 2014 at 9:37 PM, Manohar Sripada <manohar...@gmail.com> wrote:
> Thanks Erick and Toke,
>
> Also, I read here <https://wiki.apache.org/solr/SolrCaching#filterCache> that,
> filterCache can also be used for faceting with facet.method=enum. So, I am
> bit confused here on which one to use for faceting.
>
> One more thing here is I have different types of facets. (For example -
> Product List, States). The Product List facet has lot many unique values
> (around 10 million), where as States list will be in hundreds. So, I want
> to come up with the numbers for size of fieldValueCache/filterCache and
> pre-populate this.
>
> Thanks,
> Manohar
>
> On Tue, Dec 23, 2014 at 10:07 PM, Erick Erickson <erickerick...@gmail.com>
> wrote:
>
>> Or just not worry about it. The cache will be filled up automatically
>> as you query for facets etc., the benefit to trying to fill it up as
>> Toke outlines is just that the first few user queries that call for
>> faceting will be somewhat faster. But after the first few user
>> queries have gone through, it won't matter whether you've
>> pre-loaded the cache or not.
>>
>> My point is that you'll get the benefit of the cache no matter what,
>> it's just a matter of whether it's important that the first few users
>> don't have to wait while they're loaded. And with DocValues,
>> as Toke recommends, even that may be unimportant.
>>
>> Best,
>> Erick
>>
>> On Tue, Dec 23, 2014 at 1:03 AM, Toke Eskildsen <t...@statsbiblioteket.dk>
>> wrote:
>> > Manohar Sripada [manohar...@gmail.com] wrote:
>> >> From the wiki, it states that
>> >> http://wiki.apache.org/solr/SolrCaching#fieldValueCache is mostly used
>> for
>> >> faceting.
>> >
>> >> Can someone please throw some light on how to load data to this cache.
>> Like
>> >> on what solrquery option does this consider the data to be loaded to
>> this
>> >> cache.
>> >
>> > The values are loaded on first facet call with facet.method=fc.
>> > http://wiki.apache.org/solr/SimpleFacetParameters#facet.method
>> >
>> >> My requirement is I have 10 facet fields (with facetlimit - 5) to be
>> shown
>> >> in my UI. I want to speed up this by using this cache. Is there a way
>> where
>> >> I can specify only the list of fields to be loaded to FieldValue Cache?
>> >
>> > Add a facet call as explicit warmup in your solrconfig.xml.
>> >
>> > You might want to consider DocValues for your facet fields.
>> > https://cwiki.apache.org/confluence/display/solr/DocValues
>> >
>> > - Toke Eskildsen
>>

Reply via email to