Re: Caching of BitSets from filters and Query.equals()

2007-03-06 Thread Antony Bowesman
Chris Hostetter wrote: : equals to get q1.equals(q2). The core Lucene Query implementations do override : equals() to satisfy that test, but some of the contrib Query implementations do : not override equals, so you would never see the same Query twice and caching : BitSets for those Query ins

Re: Caching of BitSets from filters and Query.equals()

2007-03-06 Thread Chris Hostetter
: equals to get q1.equals(q2). The core Lucene Query implementations do override : equals() to satisfy that test, but some of the contrib Query implementations do : not override equals, so you would never see the same Query twice and caching : BitSets for those Query instances would be a waste

Re: Caching of BitSets from filters and Query.equals()

2007-03-06 Thread Antony Bowesman
Chris Hostetter wrote: : I was hoping that Query.equals() would be defined so that equality would be : based on the results that Query generates for a given reader. if query1.equals(query2) then the results of query1 on an indexreader should be identical to the results of query2 on the same inde

Re: Caching of BitSets from filters and Query.equals()

2007-03-06 Thread Chris Hostetter
: I was hoping that Query.equals() would be defined so that equality would be : based on the results that Query generates for a given reader. if query1.equals(query2) then the results of query1 on an indexreader should be identical to the results of query2 on the same indexreader ... but there in

Re: Caching of BitSets from filters and Query.equals()

2007-03-06 Thread Erik Hatcher
On Mar 6, 2007, at 6:35 AM, Antony Bowesman wrote: Erik Hatcher wrote: Have a look at the CachingWrappingFilter: It caches filters by IndexReader instance. Doesn't that still have the same issu

Re: Caching of BitSets from filters and Query.equals()

2007-03-06 Thread Antony Bowesman
Erik Hatcher wrote: Have a look at the CachingWrappingFilter: It caches filters by IndexReader instance. Doesn't that still have the same issue in terms of equality of conditions that created t

Re: Caching of BitSets from filters and Query.equals()

2007-03-06 Thread Erik Hatcher
Have a look at the CachingWrappingFilter: 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,

Caching of BitSets from filters and Query.equals()

2007-03-05 Thread Antony Bowesman
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,