[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    Re: Don't cache filter queries
From:       Dotan Cohen <dotancohen () gmail ! com>
Date:       2013-03-22 11:50:08
Message-ID: CAKDXFkMpUNLnEcYFCrrjY9JoxZvb_Xfnk=Fa=L9waZcAyncn8w () mail ! gmail ! com
[Download RAW message or body]

On Thu, Mar 21, 2013 at 6:22 PM, Chris Hostetter
<hossman_lucene@fucit.org> wrote:
>
> : Just add {!cache=false} to the filter in your query
> : (http://wiki.apache.org/solr/SolrCaching#filterCache).
>         ...
> : > I need to use the filter query feature to filter my results, but I
> : > don't want the results cached as documents are added to the index
> : > several times per second and the results will be state immediately. Is
> : > there any way to disable filter query caching?
>
> Or remove the filterCache config option from your solrconfig.xml if you
> really don't want any caching of any filter queries.
>
> Fnrakly though: that's throwing the baby out with the bath water -- just
> because you are updating your index super-fast-like doesn't mean you
> aren't getting benefts from the caches, particularly from commonly
> reused filters which are applied to many qureies which might get
> executed concurrently -- not to entnion that a single filter might be
> reused multiple times within a single request to solr.
>
> disabling cache *warming* can make a lot of sense in NRT cases, but
> eliminating caching alltogether rarely does.
>

Thanks. The problem is that the queries with filter queries are taking
much longer to run (~60-80 ms) than the queries without (~1-4 ms). I
figured that the problem may have been with the caching.

In fact, running a query with a filter query and caching disabled is
running in the range of 16-30 ms, which is quite an improvement.

Thanks.


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic