[
https://issues.apache.org/jira/browse/LUCENE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047416#comment-13047416
]
Uwe Schindler commented on LUCENE-3191:
---------------------------------------
bq. The basic idea is simple (use PQ to find top N across all shards), but, I
had to add FieldComparator.compare(Comparable, Comparable).
That makes no sense to me, because Comparable<?> can always compare against
each other without a separate comparator. The old MultiSearcher did exactly do
this. This is why it returns Comparable<?>. So instead
FieldComparator.compare(a, b) just use a.compareTo(b). It's in the
responsibility of the Comparator to return a correctly wrapped Comparable.
There might only be a bug in RelevanceComparator: Its getValue() method returns
a comparable that sorts in wrong order. We have no test for this, so it might
never cause a test failure.
> 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.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: [email protected]
For additional commands, e-mail: [email protected]