Hi all,
I am using the Lucene 9.6 version and I am trying to add queries into 
LRUQueryCache from my benchmarks that evaluate the queries and create the 
LRUQueryCache. First, I believed that Lucene puts the queries by default into 
queryCache but that was never the case. So, I read the LRUQueryCache API and 
then noticed that putIfAbsent method that puts the queries into queryCache is 
never called from Lucene and is assigned as private, so I can't call it from my 
benchmarks. I am thinking if there is another way to add queries into 
LRUQueryCache that I don't know. I will be thankful if someone can explain or 
help  me on this, If it is possible to add queries into LRUQueryCache outside 
of Lucene or if my approach is wrong.

My code that creates and sets the queryCache into benchmarks :

LRUQueryCache queryCache = new LRUQueryCache(40000, 1 * 1024 * 1024 * 1024);
QueryCachingPolicy cachingPolicy = new UsageTrackingQueryCachingPolicy();
IndexSearcher searcher = new IndexSearcher(reader);
searcher.setQueryCache(queryCache);
searcher.setQueryCachingPolicy(cachingPolicy);


Thanks in advanced

Dimitris Klinaftakis

Reply via email to