lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Updated] (LUCENE-3054) add assert to sorts catch broken comparators in tests
Date Fri, 29 Apr 2011 17:47:04 GMT


Robert Muir updated LUCENE-3054:

    Attachment: LUCENE-3054.patch

really ugly prototype... i expect the generics/sort policeman will want to jump in here anyway

but it does catch that problem:
    [junit] Testsuite: org.apache.lucene.index.TestCodecs
    [junit] Testcase: testSepPositionAfterMerge(org.apache.lucene.index.TestCodecs):    FAILED
    [junit] insane comparator for:$PostingsAndFreq

> add assert to sorts catch broken comparators in tests
> -----------------------------------------------------
>                 Key: LUCENE-3054
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Task
>            Reporter: Robert Muir
>         Attachments: LUCENE-3054.patch
> Looking at Otis's sort problem on the mailing list, he said:
> {noformat}
> * looked for other places where this call is made - found it in
> MultiPhraseQuery$MultiPhraseWeight and changed that call from
> ArrayUtil.quickSort to ArrayUtil.mergeSort
> * now we no longer see SorterTemplate.quickSort in deep recursion when we do a
> thread dump
> {noformat}
> I thought this was interesting because PostingsAndFreq's comparator
> looks like it needs a tiebreaker.
> I think in our sorts we should add some asserts to try to catch some of these broken

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message