Skip to content

MultiField sorting problem #3092

Closed as duplicate of#3081
Closed as duplicate of#3081
@markosrial

Description

@markosrial

Having the next mapping property in my index:

"title": {
  "type": "text",
  "fields": {
    "autocomplete": {
      "type": "completion"
    },
    "keyword": {
      "type": "keyword"
    }
  }
},

When a Sort like Sort.by(Sort.Direction.ASC, "title.keyword"), is added for the Pageable item, the MappingElasticsearchConverter class removes the .keyword because of the logic in methods updatePropertiesInFieldsSortAndSourceFilter > updateFieldNames. Seems it treats all the properties comming after the dot, as nested fields, while this case may represent a MultiField sorting.

Working with spring-data-elasticsearch version 5.4.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions