I need to delete a particular attribute from all documents in ElasticSearch. Is there a way to do it and can it be done via Bulk API. I am unable to find an API to Bulk Delete an attribute from ElasticSearch.
Is there any way to achieve the same.
Sample part of my document:
{
"media": {
"list1": [
{"title":"a"}
],
"list2": [
{"title":"b"}
]
}
}
Script to delete the same :
{
"script": "ctx._source.remove('media.list1')",
"query": {
"bool": {
"must": [
{
"exists": {
"field": "media.list1"
}
}
]
}
}
}