I was looking to remove some bad fields from my documents and like this functionality but I don't see a dry run, test type option that would report back number of documents that would have been affected
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
Now obviously, I could make a copy of the index, and run it against that , but I was hoping that there was a "TEST" option that run's the DELETE but does not apply the actual changes.
I am working off this article as an example
http://localhost:9200/type/_update_by_query?wait_for_completion=false&conflict=proceed
POST body:
{
"script": ctx._source.remove("XXXXXXXXXXX"),
"query": {
"bool": {
"must": [
{
"exists": {
"field": "XXXXXXXXXXXXX"
}
}
]
}
}
}