Elasticsearch Delete Mapping Property Elasticsearch Delete Mapping Property elasticsearch elasticsearch

Elasticsearch Delete Mapping Property


You can not do that. Just forget that this value exists... ;-)If you really need to remove it, you will have to reindex your documents.


You can use the new _reindex api for this, you could even PUT a new _mapping to the dest index before running the reindex so you can change the properties of the fields in your index.

To do a reindex and removing a property, you can do this:

POST /_reindex{  "source": {    "index": "twitter"  },  "dest": {    "index": "new_twitter",  },  "script": {    "inline": "ctx._source.remove('whatever')"  }}

if you would use this in combination with the _aliases API you can modify indexes without having any 'downtime'


It's not currently possible to remove a property from a mapping. In order to remove all values of a property from all records, you need to reindex all records with this property removed.