I would like to delete some items in Elasticsearch database according simple condition. I try to do it via Postman app. So I have a POST request to this url localhost:9200/newlocalsearch/_delete_by_query with this json query:
{
"query": {
"bool": {
"must_not": [
{"exists": {"field": "ico"}}
]
}
}
}
But as I send request to database it returns this error response:
{
"took": 51,
"timed_out": false,
"total": 1,
"deleted": 0,
"batches": 1,
"version_conflicts": 1,
"noops": 0,
"retries": {
"bulk": 0,
"search": 0
},
"throttled_millis": 0,
"requests_per_second": -1,
"throttled_until_millis": 0,
"failures": [
{
"index": "newlocalsearch",
"type": "doc",
"id": "0",
"cause": {
"type": "version_conflict_engine_exception",
"reason": "[doc][0]: version conflict, current version [-1] is different than the one provided [1]",
"index_uuid": "jZbdUfqwSAqtFELXB2Z2AQ",
"shard": "0",
"index": "newlocalsearch"
},
"status": 409
}
]
}
I dont understand what happens. Is there anybody out there :) who knows what it means? Thanks a lot.
It could be you need to refresh your index first:
Send a POST
request to localhost:9200/newlocalsearch/_refresh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With