Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-5222

Sorting on dynamic fields using DocValues sorts empty values always first

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      When using DocValues for sort fields, "sortMissingLast=true" seems not to work - which makes sense as DocValues require a value for every document. The workaround is to use a default value which is alphanumericly sorted last. But when specifying the sort field as a dynamic field, the default value is not applied when a document does not contain that field.
      To make it work, I had to define every single sort field explicitly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hossman Chris M. Hostetter
                Reporter:
                pchollet Pascal Chollet
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: