Bug in TopFieldCollector?

2009-03-30 Thread Shai Erera
Hi As I prepared the patch for 1575, I noticed a strange implementation in TopFieldCollector's topDocs(): ScoreDoc[] scoreDocs = new ScoreDoc[queue.size()]; if (fillFields) { for (int i = queue.size() - 1; i >= 0; i--) { scoreDocs[i] = queue.fillFields((FieldValueHitQueue.En

Re: Bug in TopFieldCollector?

2009-03-30 Thread Michael McCandless
Looks like quite a bug, Shai! Thanks. It came in with LUCENE-1483. I would say add test case & fix it under 1575. Mike On Mon, Mar 30, 2009 at 3:50 AM, Shai Erera wrote: > Hi > > As I prepared the patch for 1575, I noticed a strange implementation in > TopFieldCollector's topDocs(): > >     Sc

Re: Bug in TopFieldCollector?

2009-03-30 Thread Shai Erera
which BTW looks like this: public void testSortWithoutFillFields() throws Exception { // There was previously a bug in TopFieldCollector when fillFields was set // to false - the same doc and score was set in ScoreDoc[] array. This test // asserts that if fillFields is false, the documen

Re: Bug in TopFieldCollector?

2009-03-30 Thread Michael McCandless
tor) in the > test case I wrote, which BTW looks like this: > >   public void testSortWithoutFillFields() throws Exception { > >     // There was previously a bug in TopFieldCollector when fillFields was > set >     // to false - the same doc and score was set in ScoreDoc[] arra

RE: Bug in TopFieldCollector?

2009-03-30 Thread Uwe Schindler
[mailto:ser...@gmail.com] Sent: Monday, March 30, 2009 10:20 AM To: java-dev@lucene.apache.org Subject: Re: Bug in TopFieldCollector? Already did ! Another question - I think we somehow broke TopFieldCollector ... Previously, in TopFieldDocCollector, it accepted an IndexReader as a parameter

Re: Bug in TopFieldCollector?

2009-03-30 Thread Michael McCandless
of the subreaders itself recursively. > > > > Uwe > > - > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: u...@thetaphi.de > > > > From: Shai Erera [mailto:ser...@gmail.com] > Sent

RE: Bug in TopFieldCollector?

2009-03-30 Thread Uwe Schindler
ichael McCandless [mailto:luc...@mikemccandless.com] > Sent: Monday, March 30, 2009 10:44 AM > To: java-dev@lucene.apache.org > Subject: Re: Bug in TopFieldCollector? > > Well, IndexSearcher also sorts its readers biggest to smallest (by > .numDocs()) for better performance (so that th

Re: Bug in TopFieldCollector?

2009-03-30 Thread Shai Erera
H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: u...@thetaphi.de > > > -Original Message- > > From: Michael McCandless [mailto:luc...@mikemccandless.com] > > Sent: Monday, March 30, 2009 10:44 AM > > To: java-dev@lucene.apache.org > >