Version conflict when using update_by_query

Hi all,

I'm trying to use update_by_query to update a field in each document but I keep failing due to a version conflict. I don't understand why I am getting version conflicts as I know nothing else is running against the documents I want to update. Any ideas?

The query I'm passing to ES Client in Ruby is:

        "script": {
          "inline": "ctx._source['salesforce_account_status'] = '#{account[:salesforce_account_status]}'",
          "lang": "painless"
        "query": {
          "term": {
            "account_id": account[:account_id]
1 Like

Hi Kornelia,

Do you have an example of a conflict error?
Is the conflict because the version is the same version or that it's trying to use a version that's behind the new version the doc has when it goes to update?

If the same version, then it might be that you just have to manually increment it somehow when writing the doc back.

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