Search code examples
node.jselasticsearchelasticsearch-5amazon-elasticsearch

Can we set ignore_malformed flag true of an already existing index in elasticsearch


I'm new to elasticsearch. I'm re-indexing old index to new index. but while re-indexing millions of records sometime, I am getting mapper_parsing_exception exception. so my question is that, Is there a way to set ignore_malformed flag true of an already existing index.


Solution

  • Yes, it's possible to change the ignore_malformed setting dynamically simply by running this:

    PUT logstash_june_2019/doc/_mapping
    {
      "properties": {
        "createdAt": {
          "type" : "date",
          "ignore_malformed": true             <--- add this
        }
      }
    }