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

Docvalues sorting treats empty values as the default

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • 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

              Unassigned Unassigned
              erickerickson Erick Erickson

              Dates

                Created:
                Updated:

                Slack

                  Issue deployment