Have a look at the CachingWrappingFilter:
<http://lucene.apache.org/java/docs/api/org/apache/lucene/search/
CachingWrapperFilter.html>
It caches filters by IndexReader instance.
Erik
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]