[ 
https://issues.apache.org/jira/browse/LUCENE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056339#comment-13056339
 ] 

Uwe Schindler edited comment on LUCENE-3191 at 6/28/11 7:34 AM:
----------------------------------------------------------------

bq. I haven't tracked this issue to understand whats going on here, but you 
cannot pass BytesRefs to collator.compare. If this code is ever reached (and 
looking at the test i wrote for this damn thing, its unclear if this code is 
even necessary?!)

The code is necessary once you -cross segments during compare- merge TopDocs. 
-Maybe the index in the tests is so small that it never has multiple segments.-

The clover report shows that this is not the case, it even shows that compare 
does not use compareBottom():
[https://builds.apache.org/job/Lucene-trunk/clover/org/apache/lucene/search/SlowCollatedStringComparator.html]

-It never ever calls even compareBottom() so this index is really small. We 
should make it bigger to test correctly. The getValue() method is only called 
because the actual String (previously: BytesRef) values are placed in 
TopFieldDocs.-

      was (Author: thetaphi):
    bq. I haven't tracked this issue to understand whats going on here, but you 
cannot pass BytesRefs to collator.compare. If this code is ever reached (and 
looking at the test i wrote for this damn thing, its unclear if this code is 
even necessary?!)

The code is necessary once you cross segments during compare. Maybe the index 
in the tests is so small that it never has multiple segments.

The clover report shows that this is the case:
[https://builds.apache.org/job/Lucene-trunk/clover/org/apache/lucene/search/SlowCollatedStringComparator.html]

It never ever calls even compareBottom() so this index is really small. We 
should make it bigger to test correctly. The getValue() method is only called 
because the actual String (previously: BytesRef) values are placed in 
TopFieldDocs.
  
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to