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:jpou...@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 <kont...@samtundsonders.at> a

samt & sonders <mailto:kont...@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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

------------------------------------------------------------------------

Reply via email to