title: Elasticsearch: update by query: how to handle version conflict?
body: <p>I want to execute update by query on elastic, when other daemons are (maybe) also updating documents. The consequence of this is version conflict.</p>
  <p>I want to get list of <strong>all</strong>(not only one bulk) ids of conflicted documents (for manual retry) or set up retry_on_conflict for update by query.</p>
  <p>How can I do it?</p>
  <p>Example of my query:</p>
  <pre class="lang-json prettyprint-override"><code>    &quot;script&quot;: {
          &quot;inline&quot;: &quot;ctx._source['msp']=null&quot;,
          &quot;lang&quot;: &quot;painless&quot;
      },
      &quot;query&quot;: {
          &quot;bool&quot;: {
              &quot;must_not&quot;: {
                  &quot;terms&quot;: {
                      &quot;msp-rev&quot;: [44]
                  }
              },
              &quot;must&quot; : {
                  &quot;exists&quot;: {
                      &quot;field&quot;: &quot;msp&quot;
                  }
              }
          }
      }
  </code></pre>