lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-3191) Add TopDocs.merge to merge multiple TopDocs
Date Tue, 28 Jun 2011 07:26:17 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Uwe Schindler updated LUCENE-3191:
----------------------------------

    Attachment: LUCENE-3191-SlowCollatorCompareFix.patch

New patch that also checks the getValue/compareValues methods in the comparator.

Sorry, my earlier comment about too small indexes was wrong. The indexes in fact have segments.
The problem was that I was irritated by the former MultiSearcher code that used these compareValues()
code. In trunk, only TopDocs.merge() does this.

So I changed the test:
- It does not use MatchAllDocsQuery, instead two TermRangeQueries with a random center point,
so it splits the index into two parts. Each result is sorted and checked that its valid.
- With the two result sets it calls TopDocs.merge() and again checks the result. This call
will invoke the value methods and here the test fails as Robert said.
- For each search call it does *not* always set the maximum number of docs as PQ size (else
compareBottom/setBottom) are not tested. It reduces the PQ size to a fraction of numDocs for
all searches.

In general we should add similar tests to all custom comparators in Lucene's code, because
the comparator can only be tested completely if you also check merging TopDocs.

> Add TopDocs.merge to merge multiple TopDocs
> -------------------------------------------
>
>                 Key: LUCENE-3191
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3191
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 3.3, 4.0
>
>         Attachments: LUCENE-3191-3x.patch, LUCENE-3191-SlowCollatorCompareFix.patch,
LUCENE-3191-SlowCollatorCompareFix.patch, LUCENE-3191.patch, LUCENE-3191.patch, LUCENE-3191.patch,
LUCENE-3191.patch, LUCENE-3191.patch
>
>
> It's not easy today to merge TopDocs, eg produced by multiple shards,
> supporting arbitrary Sort.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message