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
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
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
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
[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
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
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
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
> >