Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7548

Docvalues sorting treats empty values as the default

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I found this working on Solr, Mike suggested I raise it as a Lucene issue.

      This was for int fields, I'll assume the same holds for other types.

      The sort order is as though the null field was explicitly set to zero, the whole idea of sorting missing first is lost.

      doc1
      int_dv = 0
      int_sort = 1

      doc2
      int_sort=2

      doc3
      int_dv = 0
      int_sort=3

      sort by int_dv asc,int_sort asc gives
      doc1
      doc2
      doc3

      when it should give
      doc2
      doc1
      doc3

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: