Combining TopFieldCollector with custom Collector

2010-03-11 Thread Peter Keegan
Is it possible to issue a single search that combines a TopFieldCollector (MultiComparatorScoringMaxScoreCollector) with a custom Collector? The custom Collector just collects the doc IDs into a BitSet (or DocIdSet). The collect() methods of the various TopFieldCollectors cannot be overridden. Tha

Re: Combining TopFieldCollector with custom Collector

2010-03-11 Thread Michael McCandless
Can you make your own collector and then just delegate internally to TFC? Mike On Thu, Mar 11, 2010 at 2:30 PM, Peter Keegan wrote: > Is it possible to issue a single search that combines a TopFieldCollector > (MultiComparatorScoringMaxScoreCollector) with a custom Collector? The > custom Collec

Re: Combining TopFieldCollector with custom Collector

2010-03-11 Thread Peter Keegan
Yes. Could you give me a hint on how to delegate? On Thu, Mar 11, 2010 at 2:50 PM, Michael McCandless < luc...@mikemccandless.com> wrote: > Can you make your own collector and then just delegate internally to TFC? > > Mike > > On Thu, Mar 11, 2010 at 2:30 PM, Peter Keegan > wrote: > > Is it poss

Re: Combining TopFieldCollector with custom Collector

2010-03-11 Thread Michael McCandless
In your collector, create the TFC and save it as tfc. Then in each of Collectors methods that you implement, do your own stuff (setting the bit) but also then call tfc.XXX (eg tfc.collect). That should work? Mike On Thu, Mar 11, 2010 at 2:57 PM, Peter Keegan wrote: > Yes. Could you give me a h

Re: Combining TopFieldCollector with custom Collector

2010-03-11 Thread Peter Keegan
Yes, but none of the other TFC methods would get called because none of the TFC classes can be extended. Or am I missing something? On Thu, Mar 11, 2010 at 3:37 PM, Michael McCandless < luc...@mikemccandless.com> wrote: > In your collector, create the TFC and save it as tfc. > > Then in each of C

Re: Combining TopFieldCollector with custom Collector

2010-03-11 Thread Peter Keegan
I want the TFC to do all the cool things it does like custom sorting, saving the field values, max score, etc. I suppose the custom Collector could explicitly delegate all TFC's methods, but this doesn't seem right. Peter On Thu, Mar 11, 2010 at 3:40 PM, Peter Keegan wrote: > Yes, but none of th

Re: Combining TopFieldCollector with custom Collector

2010-03-11 Thread Yonik Seeley
On Thu, Mar 11, 2010 at 4:10 PM, Peter Keegan wrote: > I want the TFC to do all the cool things it does like custom sorting, saving > the field values, max score, etc. I suppose the custom Collector could > explicitly delegate all TFC's methods, but this doesn't seem right. No need to delegate th

Re: Combining TopFieldCollector with custom Collector

2010-03-11 Thread Michael McCandless
On Thu, Mar 11, 2010 at 4:10 PM, Peter Keegan wrote: > I want the TFC to do all the cool things it does like custom sorting, saving > the field values, max score, etc. I suppose the custom Collector could > explicitly delegate all TFC's methods, but this doesn't seem right. Right, that's what I w

RE: Combining TopFieldCollector with custom Collector

2010-03-12 Thread Uwe Schindler
o: java-user@lucene.apache.org > Subject: Re: Combining TopFieldCollector with custom Collector > > Yes, but none of the other TFC methods would get called because none of > the > TFC classes can be extended. Or am I missing something? > > On Thu, Mar 11, 2010 at 3:

Re: Combining TopFieldCollector with custom Collector

2010-03-12 Thread Peter Keegan
ier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: u...@thetaphi.de > > > > -Original Message- > > From: Peter Keegan [mailto:peterlkee...@gmail.com] > > Sent: Thursday, March 11, 2010 9:41 PM > > To: java-user@lucene.apache.org > > Subject: R