lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samt & sonders <kont...@samtundsonders.at>
Subject Re: Proper use of LRUQueryCache
Date Fri, 08 Jan 2016 11:04:42 GMT
Hi Adrien,

thanks for your response!
It seems like a default QueryCache is already set for an IndexReader 
acquired by the SearcherManager. Is there any information about the 
default settings?

And are there any requirements I have to meet for the cache to work 
properly beside than having a BooleanQuery with 
BooleanClause.Occur.FILTER clauses?

Cheers,
Andreas

> Adrien Grand <mailto:jpountz@gmail.com>
> 7 January 2016 at 20:50
> Hi Andreas,
>
> The easiest way is to use the query cache through
> IndexSearcher.setQueryCache. Then IndexSearcher will figure out by itself
> which filters are worth caching.
>
> Le jeu. 7 janv. 2016 à 13:30, samt & sonders <kontakt@samtundsonders.at> a
>
> samt & sonders <mailto:kontakt@samtundsonders.at>
> 7 January 2016 at 19:30
> Hi,
>
> I'm changing my code from using 
> CachingWrapperQuery/CachingWrapperFilter to LRUQueryCache and I'm 
> running into some questions:
>
> 1.) what is the right way to use the LRUQueryCache:
>
> Query myCacheQuery = queryCache.doCache(myQuery, defaultCachingPolicy);
>
> a.)   Doing this ones and re-use myCacheQuery
>
> b.)  Doing this every time (which means I always have to rebuild myQuery)
>
>
> 3.) Before I have created one CachingWrapperFilter for each Filter. Am 
> I now supposed to create one LRUQueryCache for all of my Filters 
> (which are now Queries) or can it still create one LRUQueryCache for 
> each Filter (does it make sense?)
>
>
> Thanks for any help,
> Andreas
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
> ------------------------------------------------------------------------


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message