Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-18415

Elasticsearch sorting on an unmapped field fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 9.1
    • Component/s: Elasticsearch

      Description

      Sorting on a field that is not explicitly defined in the mapping and that has never been submited via a document fails with:

      Failed to execute phase [dfs], all shards failed; shardFailures ... Parse Failure [No mapping found for [my:field] in order to sort on]
      

      A possible work around is to define the field in the Nuxeo Elasticsearch mapping:

      "my:field" : {
         "type" : "string"
      }
      

      or to create a document with non empty field.

      This could be fixed by adding an unmapped_type sort option as describe here:
      https://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-request-sort.html

      No more SearchParseException on unmapped/unindexed field when sorting, we now using the unmappedType sort option.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h