I am trying to figure out an approach to delete all entries for a specific property in an elasticsearch index and remove all type mappings for that property.
I have been looking at the following two doc pages: put mapping and delete mapping
From second link:
"Allow to delete a mapping (type) along with its data. The REST endpoint is /{index}/{type} with DELETE method."
What I think I need is a /{index}/{type}/{property}
?
Do I need to recreate the whole index to accomplish this, i.e. moving and manipulating data between types?
For Example, calling GET on the mapping:
curl -XGET 'http://.../some_index/some_type/_mapping'
result:
{
"some_type": {
"properties": {
"propVal1": {
"type": "double",
"index": "analyzed"
},
"propVal2": {
"type": "string",
"analyzer": "keyword"
},
"propVal3": {
"type": "string",
"analyzer": "keyword"
}
}
}
}
after this delete operation on propVal3
would return:
curl -XGET 'http://.../some_index/some_type/_mapping'
result:
{
"some_type": {
"properties": {
"propVal1": {
"type": "double",
"index": "analyzed"
},
"propVal2": {
"type": "string",
"analyzer": "keyword"
}
}
}
}
and all data for propVal3
would be removed through the index.