Inline.

On Tue, Dec 23, 2014 at 11:12 PM, Manohar Sripada <manohar...@gmail.com> wrote:
> Okay. Let me try like this, as mine is a read-only index. I will have some
> queries in firstSearcher event listener
> 1) q=*:*&facet=true&facet.method=enum&facet.field=state   --> To load all
> the state related unique values to filterCache.

It's not necessary to use facet.method=enum here at all, just facet on the field
and trust the heuristics built in. If you insist on this be very sure you can
afford the space.

>    > Will it use filterCache when I sent a query with filter, eg:
> fq=state:CA ??

Don't know. Try it and look on admin/stats for the filter cache. You'll
see a new insert if it does not use the one already there.


>    > Once it is loaded, Do I need to sent a query with facet.method=enum
> every time along with facet.field=state to get state related facet data
> from filterCache?

See above. You haven't told us how many docs in your index, so we
have no way of estimating how much this'll cost you. Each entry
will be maxDoc/8 roughly, and you'll have about 50 of them.

Yes, though, if you take control of the facet.method you'll have to
add it every time.

>
> 2) q=*:*&facet=true&facet.method=fc&facet.field=products  --> To load the
> values related to products to fieldCache.
>     > Again, while querying for this facet do I need to sent
> facet.method=fc every time?
See above.

>
> Thanks,
> Manohar
>
> On Wed, Dec 24, 2014 at 11:36 AM, Erick Erickson <erickerick...@gmail.com>
> wrote:
>
>> 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