Skip to content

index_prefixes causing errors when upgrading from 6.3 to 7.10 #85181

Closed as not planned
@ahmedakef

Description

@ahmedakef

Elasticsearch Version

7.10

Installed Plugins

mapper-murmur3

Java Version

openjdk version "1.8.0_272"

OS Version

4.4.102-k8s

Problem Description

after restore a snapshot from ES 6.3 to ES 7.10, this error is shown when trying to index a new document

{
    "error": {
        "root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "cannot change field \\"os._index_prefix\\" from index options=DOCS to inconsistent index options=DOCS_AND_FREQS_AND_POSITIONS"
            }
        ],
        "type": "illegal_argument_exception",
        "reason": "cannot change field \\"os._index_prefix\\" from index options=DOCS to inconsistent index options=DOCS_AND_FREQS_AND_POSITIONS"
    },
    "status": 400
}

the mapping itself wasn't changed between the ES 6.3 and ES 7.10 and it is:

"os" : {
    "type" : "text",
    "fields" : {
      "keyword" : {
        "type" : "keyword",
        "normalizer" : "lowercase_normalizer"
      }
    },
    "analyzer" : "package_analyzer",
    "index_prefixes" : {
      "min_chars" : 2,
      "max_chars" : 10
    }
  }

Steps to Reproduce

  • create an index with this mapping in ES 6.3 cluster
  • restore a snapshot into ES 7.10 cluster
  • index new document

Logs (if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search Foundations/MappingIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in Elasticsearchpriority:highA label for assessing bug priority to be used by ES engineers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions