lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Caching of BitSets from filters and Query.equals()
Date Tue, 06 Mar 2007 10:38:10 GMT
Have a look at the CachingWrappingFilter:


It caches filters by IndexReader instance.


On Mar 6, 2007, at 2:03 AM, Antony Bowesman wrote:

> Not sure if I'm going about this the right way, but I want to use  
> Query instances as a key to a HashMap to cache BitSet instances  
> from filtering operations.  They are all for the same reader.
> That means equals() for any instance of the same generic Query  
> would have to return true if the terms, boost and other factors of  
> the Query would result in the same BitSet.  Most of the Query  
> instances override equals and return true based on the Query.  At  
> least BooleanQuery would not give true, because it does not base  
> the equals on the encapsulated clauses, but in practice that is not  
> a problem as BooleanQuery will not be used as a Filter.
> It looks like it will work in the main, but I was wondering if  
> there was any unwritten, but exepected, contract for a Query's  
> equals()?
> Thanks
> Antony
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message