Hello,
I'm using ES 1.7
I'm trying to remove a field that only appears in some of the documents on my index. Here is my query:
curl -XPOST 'localhost:9200/data/_update' -d '{"script" : "ctx._source.remove = \"publisher\""}'
and the answer I get is:
{"error":"InvalidTypeNameException[mapping type name [_update] can't start with '_']", "status":400}
So I removed the "_" from "update":
curl -XPOST 'localhost:9200/data/update' -d '{"script" : "ctx._source.remove = \"publisher\""}'
And the output:
{"_index":"df","_type":"case", "_id":update","_varsion":1,"created":true}
But then I look at the index on kibana and it didn't delete the field.
So I tried again, the output was a bit different:
{"_index":"df","_type":"case", "_id":update","_varsion":2,"created":false}
But still didn't delete it. What am I doing wrong?