lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject Caching of BitSets from filters and Query.equals()
Date Tue, 06 Mar 2007 07:03:42 GMT
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message