Solr
  1. Solr
  2. SOLR-2881

Trie fields should support sortMissingLast="true"

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.5, 4.0-ALPHA
    • Fix Version/s: 3.5, 4.0-ALPHA
    • Component/s: Schema and Analysis
    • Labels:
      None
    • Environment:

      All

      Description

      Spinoff from SOLR-2134. The consensus is that the way sortMissingFirst is done in 3x is superior to 4x and when that is done (see LUCENE-3443) then the sortMissingFirst code should be incorporated into both.

      As of now, however, the Trie fields in 4.0 support sortMissingFirst but not yet in 3.x

      1. SOLR-2881-3x.patch
        19 kB
        Erick Erickson
      2. SOLR-2881.patch
        19 kB
        Erick Erickson

        Issue Links

          Activity

          Hide
          Uwe Schindler added a comment -

          Erick: Do you have a patch? I have seen your insanity report on IRC but was not able to reproduce without a patch. The insanity reported at http://colabti.org/irclogger/irclogger_log/lucene-dev?date=2011-11-11#l208 looks correct (and should be allowed), but maybe there is something else still using the StringIndex cache.

          Show
          Uwe Schindler added a comment - Erick: Do you have a patch? I have seen your insanity report on IRC but was not able to reproduce without a patch. The insanity reported at http://colabti.org/irclogger/irclogger_log/lucene-dev?date=2011-11-11#l208 looks correct (and should be allowed), but maybe there is something else still using the StringIndex cache.
          Hide
          Erick Erickson added a comment -

          Uwe:

          Mike e-mailed me with a possibility and it looks like he nailed it. We'll coordinate what to do next, but it looks like we'll get it fixed up.

          I should be able to put up a patch later this evening (EST), will that do?

          Show
          Erick Erickson added a comment - Uwe: Mike e-mailed me with a possibility and it looks like he nailed it. We'll coordinate what to do next, but it looks like we'll get it fixed up. I should be able to put up a patch later this evening (EST), will that do?
          Hide
          Michael McCandless added a comment -

          OK I committed the missing "it's not insane if a field has both Bits and array entries" – just missed this on backport for LUCENE-3443.

          Show
          Michael McCandless added a comment - OK I committed the missing "it's not insane if a field has both Bits and array entries" – just missed this on backport for LUCENE-3443 .
          Hide
          Erick Erickson added a comment -

          Without LUCENE-3443, this probably won't work at all.

          Show
          Erick Erickson added a comment - Without LUCENE-3443 , this probably won't work at all.
          Hide
          Erick Erickson added a comment -

          I think this is ready to commit if we clear one thing up. Look at the tests and you'll see that default sorting for dates is a special case. The sorting behavior for dates is, indeed, different from longs when sortMissingFirst/Last are not specified. The behavior is consistent with 3.3 (it was handy to test 3.3 rather than 3.4) however, so neither LUCENE-3443 nor this patch change sorting in this case.

          I'd like to commit this tomorrow (Sunday). Since the reconciliation process is a bit "interesting" between Mike's and my changes, I think that a patch for each is preferable, but we know I'm "merge challenged".

          Note also that Mike, as part of 3441, made the parallel set of changes for 4.x already. That said, I'm going to create a small 4.x patch that changes the example schema.xml and incorporates the date test from this patch. I'll attach that file to SOLR-2134

          Show
          Erick Erickson added a comment - I think this is ready to commit if we clear one thing up. Look at the tests and you'll see that default sorting for dates is a special case. The sorting behavior for dates is, indeed, different from longs when sortMissingFirst/Last are not specified. The behavior is consistent with 3.3 (it was handy to test 3.3 rather than 3.4) however, so neither LUCENE-3443 nor this patch change sorting in this case. I'd like to commit this tomorrow (Sunday). Since the reconciliation process is a bit "interesting" between Mike's and my changes, I think that a patch for each is preferable, but we know I'm "merge challenged". Note also that Mike, as part of 3441, made the parallel set of changes for 4.x already. That said, I'm going to create a small 4.x patch that changes the example schema.xml and incorporates the date test from this patch. I'll attach that file to SOLR-2134
          Hide
          Erick Erickson added a comment -

          "Note also that Mike, as part of 3441" should have been "Note also that Mike, as part of LUCENE-3443"

          Show
          Erick Erickson added a comment - "Note also that Mike, as part of 3441" should have been "Note also that Mike, as part of LUCENE-3443 "
          Hide
          Uwe Schindler added a comment -

          Hey, I also want to be listed in changes.txt as I did the new Lucene API with its sophisticated v2==0 and super.setNextReader logic

          Otherwise, looks fine!

          Show
          Uwe Schindler added a comment - Hey, I also want to be listed in changes.txt as I did the new Lucene API with its sophisticated v2==0 and super.setNextReader logic Otherwise, looks fine!
          Hide
          Erick Erickson added a comment -

          SOLR-2134 fixes this issue for 4.x, this patch applies only to the 3x branch

          Show
          Erick Erickson added a comment - SOLR-2134 fixes this issue for 4.x, this patch applies only to the 3x branch
          Hide
          Erick Erickson added a comment -

          Even credited Uwe in the CHANGES.txt file.

          Show
          Erick Erickson added a comment - Even credited Uwe in the CHANGES.txt file.
          Hide
          Simon Willnauer added a comment -

          I just moved the changes entry to the trunk changes file too. Erick we need to try to keep them in sync

          Show
          Simon Willnauer added a comment - I just moved the changes entry to the trunk changes file too. Erick we need to try to keep them in sync
          Hide
          Erick Erickson added a comment -

          Thanks Simon, now I've learned yet another bit on how things work...

          Show
          Erick Erickson added a comment - Thanks Simon, now I've learned yet another bit on how things work...
          Hide
          Uwe Schindler added a comment -

          Bulk close after 3.5 is released

          Show
          Uwe Schindler added a comment - Bulk close after 3.5 is released

            People

            • Assignee:
              Erick Erickson
              Reporter:
              Erick Erickson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development