lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otmar Caduff <>
Subject CachingWrapperQuery deprecated
Date Thu, 25 Feb 2016 18:07:37 GMT

Just switched from Lucene 5.1 to Lucene 5.5 and noticed that has been deprecated.

Up until now I used that class to solve the following problem: I have a
query covering multiple fields. In the end, I have to give feedback on
which fields matched. Once the original query was run, I re-executed the
query, but restricting to the single fields involved, so as to find out
which ones matched. I achieved this having the original query wrapped in a

According to the Javadoc (,
I should now switch to something like LRUQueryCache.

The typical usage mentioned in the Javadoc (
didn’t help me, since as opposed to the use provided in the Javadoc, there
is no method “Query doCache(Query query, QueryCachingPolicy policy)”, but
“Weight doCache(Weight weight, QueryCachingPolicy policy)” instead.

However, since the LRUQueryCache is marked as experimental, I’m not sure if
I’m still on a good track. Should I solve my problem differently?

Any help would be appreciated!


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