1

I have updated my mappings/synonyms. I would like to reindex my data to the same index. I tried _reindex API

POST _reindex
{
  "source": {
    "index": "test"
  },
  "dest": {
    "index": "test"
  }
}

I get the following error

{
  "error": {
    "root_cause": [
      {
        "type": "action_request_validation_exception",
        "reason": "Validation Failed: 1: reindex cannot write into an index its reading from [test];"
      }
    ],
    "type": "action_request_validation_exception",
    "reason": "Validation Failed: 1: reindex cannot write into an index its reading from [test];"
  },
  "status": 400
}

What Am I doing wrong

Kaushik J
  • 962
  • 7
  • 17

1 Answers1

4

This is an open issue in elasticsearch. details here

You can check out _update_by_query API:
It Updates documents that match the specified query. If no query is specified, performs an update on every document in the index without modifying the source, which is useful for picking up mapping changes.

POST index_name/_update_by_query?conflicts=proceed

more info here