I have an index that supports dynamic mappings under a field of type Object that we named custom. My doc also has other objects properties with inner props. I attached an abbreviated mapping - notice my object for "realm" and it's properties
Using the Update API I can remove a field per the docs <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html> *if* it's a top level field. For example this works great: POST /test-timbr-2015.02.19/event/0f78c6b6-a30b-436e-bad7-4234654fc5bb/_update { "script" : "ctx._source.remove(\"threadid\")" } However, when I run the script against a document that has a field nested in a specific object graph the specified field doesn't get deleted. I'm using dot notation as you can see, and when I run this ES comes back with a HTTP 200 and the _version property gets incremented. POST /test-timbr-2015.02.19/event/0f78c6b6-a30b-436e-bad7-4234654fc5bb/_update { "script" : "ctx._source.remove(\"realm.name\")" } How can I get inner properties like this removed via the Update API. Thanks for your help. Steve -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9d4e960e-7a90-4a64-9f53-d7391b15b3a1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
{ "settings": { "number_of_shards": 3, "number_of_replicas": 1, "refresh_interval": "5s" }, "mappings": { "event": { "_all": { "enabled": true }, "_timestamp": { "enabled": true, "store": "yes" }, "properties": { "id": { "type": "string", "precision_step": "1" }, "loggeddate": { "type": "date", "precision_step": "1" }, "level": { "type": "string", "index": "not_analyzed" }, "name": { "type": "multi_field", "fields": { "analyzed": { "type": "string", "index": "analyzed" }, "name": { "type": "string", "index": "not_analyzed" } } }, "tags": { "type": "string", "index": "not_analyzed" }, "realm": { "type": "object", "properties": { "type": { "type": "string", "index": "not_analyzed" }, "name": { "type": "string", "index": "not_analyzed" }, "host": { "type": "string", "index": "not_analyzed" }, "instanceid": { "type": "string", "index": "not_analyzed" } } }, "custom": { "type": "object", "index": "not_analyzed" } } } } }