Cross-Cluster document deletes


(Ganesh) #1

I have multiple ES clusters indexing data and cross-cluster search helps to retrieve documents from all clusters. Now, I would like to delete a few documents and need to delete from multiple clusters. However I get the following error when I use "remote-index-name:index-name" in the delete_by_query API's index name:
version conflict, current version [-1] is different than the one provided [2]

The version I get from the second cluster is 2. How does ES get version -1 in this case (is this an bug in cluster-wide settings?)

My delete call is like so:
curl -sX POST 'localhost:9200/remote-cluster-*:my-index/_delete_by_query?pretty' -H "Content-Type: application/json" -H "Accept: application/json" --data "@params.json"

And I have remote-cluster-1, remote-cluster-2, and remote-cluster-3 defined in persistent settings for cross-cluster search.


(Mark Walkom) #2

What version are you on? Can you post the entire command and output?


(Ganesh) #3

I am using Elasticsearch 6.1.1.

The _search query is for a single field (name=request_count) and for search response there are two entries returned from two clusters. However both have timestamps which are different, and the version is also different (1,2). Hence search listing works, but delete does not.
Is cross-cluster query not supposed to work for deleting records? Why does it have a -1 version?


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.