Solr
  1. Solr
  2. SOLR-1777

fields with sortMissingLast don't sort correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.4.1, 1.5, 3.1, 4.0-ALPHA
    • Component/s: search
    • Labels:
      None

      Description

      field types with the sortMissingLast=true attribute can have results sorted incorrectly.

      1. SOLR-1777.patch
        11 kB
        Yonik Seeley
      2. SOLR-1777.patch
        12 kB
        Yonik Seeley

        Activity

        Hide
        Yonik Seeley added a comment - - edited

        The issue had to do with ords and ord normalization in sort-missing-last.
        Here's a patch with tests and a rewritten MissingLastOrdComparator that manipulates ord values rather than trying to just handle nulls.

        note: not all tests pass yet.

        Show
        Yonik Seeley added a comment - - edited The issue had to do with ords and ord normalization in sort-missing-last. Here's a patch with tests and a rewritten MissingLastOrdComparator that manipulates ord values rather than trying to just handle nulls. note: not all tests pass yet.
        Hide
        Yonik Seeley added a comment -

        OK, here's the final patch with all tests passing.

        Show
        Yonik Seeley added a comment - OK, here's the final patch with all tests passing.
        Hide
        Yonik Seeley added a comment -

        committed.

        Show
        Yonik Seeley added a comment - committed.
        Hide
        Hoss Man added a comment -

        Yonik: just to be verify: was this bug was introduced in Solr 1.4? ... presumably because of the changes to per segment collecting?

        (that's the way the "Affects Version/s" is marked, but i want to sanity check in case it was actually a more fundamental problem affecting earlier versions of Solr as well).

        Show
        Hoss Man added a comment - Yonik: just to be verify: was this bug was introduced in Solr 1.4? ... presumably because of the changes to per segment collecting? (that's the way the "Affects Version/s" is marked, but i want to sanity check in case it was actually a more fundamental problem affecting earlier versions of Solr as well).
        Hide
        Yonik Seeley added a comment -

        Yonik: just to be verify: was this bug was introduced in Solr 1.4?... presumably because of the changes to per segment collecting?

        Yep. The per-segment collecting and the FieldComparator changes caused us to rewrite all of our custom comparators... and this one had bugs.

        Show
        Yonik Seeley added a comment - Yonik: just to be verify: was this bug was introduced in Solr 1.4?... presumably because of the changes to per segment collecting? Yep. The per-segment collecting and the FieldComparator changes caused us to rewrite all of our custom comparators... and this one had bugs.
        Hide
        Lance Norskog added a comment -

        Correction: Tom Hill and I have seen this bug in the distant past on Solr 1.2 or 1.3.

        Show
        Lance Norskog added a comment - Correction: Tom Hill and I have seen this bug in the distant past on Solr 1.2 or 1.3.
        Hide
        Yonik Seeley added a comment -

        Correction: Tom Hill and I have seen this bug in the distant past on Solr 1.2 or 1.3.

        Then it was a different bug. This code was all new for 1.4
        Was it reproducible, and was a bug report filed? Can it still be reproduced?

        Show
        Yonik Seeley added a comment - Correction: Tom Hill and I have seen this bug in the distant past on Solr 1.2 or 1.3. Then it was a different bug. This code was all new for 1.4 Was it reproducible, and was a bug report filed? Can it still be reproduced?
        Hide
        Hoss Man added a comment -

        Correcting Fix Version based on CHANGES.txt, see this thread for more details...

        http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E

        Show
        Hoss Man added a comment - Correcting Fix Version based on CHANGES.txt, see this thread for more details... http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E
        Hide
        Hoss Man added a comment -

        Committed revision 949474.

        merging to branch-1.4 for 1.4.1

        Show
        Hoss Man added a comment - Committed revision 949474. merging to branch-1.4 for 1.4.1

          People

          • Assignee:
            Yonik Seeley
            Reporter:
            Yonik Seeley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development