Skip to content

Cannot recover from bad analysis settings #23787

@jpountz

Description

@jpountz

This problem was reported at https://discuss.elastic.co/t/keyword-filter-requires-either-keywords-or-keywords-path-to-be-configured/80332/3. If you update analysis settings with an empty list of keywords in a keyword marker filter on a closed index, the index will fail to reopen and there does not seem to be any way to recover from this situation. This problem was reported on Elasticsearch 5.2 but reproduces on master:

DELETE my_index

PUT my_index

POST my_index/_close

PUT my_index/_settings
{
  "index": {
    "analysis": {
      "filter": {
        "my_keywords": {
          "type": "keyword_marker"
        }
      }
    }
  }
}

Once we reach this point, it does not seem possible to open the index again. For instance, the commands below that try to set a dummy list of keywords to make the filter valid again fail:

POST my_index/_open

POST my_index/_close

PUT my_index/_settings
{
  "index": {
    "analysis": {
      "filter": {
        "my_keywords": {
          "type": "keyword_marker",
          "keywords": [ "foo", "bar" ]
        }
      }
    }
  }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions