Bulk Delete an attribute from a document in ElasticSearch 6+ Bulk Delete an attribute from a document in ElasticSearch 6+ elasticsearch elasticsearch

Bulk Delete an attribute from a document in ElasticSearch 6+


If you are looking to just delete a field from the doc (rather than deleting the entire doc), you need to use a painless script. See this question post as reference for writing a script to delete a field from a document.

To update all docs in an index, put the painless script to remove a field inside an Update By Query API, using a match_all as the 'query' to update all documents.

You wouldn't want to use Bulk API for this. Bulk API would be used if you wanted to replace entire documents (update) with new information.