Uploading document into ES without overwriting the current mapping

We are using Elasticsearch to index documents automatically from the external system. We added some setting for the current mapping and when we import new documents/data the current mapping setting are overwritten. Is there some way of importing documents/data without overwriting the setting in the current index schema/mapping. Thanks in advance for your assistance.

1 Like

So do you mean that your mapping now includes fields that you do not want? Perhaps you need to disable dynamic mapping:

https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-field-mapping.html

If you set the dynamic parameter to "strict" then documents containing unexpected fields will result in the document not being indexed.

Hi Steven, Thanks for you reply. I probably did not explain it clear enough.

I do want keep the new fields and the old fields. Currently when we load data/documents directly into ES the new fields are loaded correctly - which is what we want - but the old settings of certain fields such as - index = "not_analyzed" are overwritten in the upload process.

Please note that we not using Logstash at the moment we directly indexing the data from an external app to ES. Your advice on this matter will very much be appreciated.

Peter

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.