title: _update_by_query in elasticserach-php client
body: <p>I am using elasticsearch 6.2 with <a href="https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html" rel="nofollow noreferrer">elasticsearch-php</a> 6.0 client. There is situation i got stuck. I need to update field <code>userid</code> = 987 where <code>userid</code> = 123. I went through <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html" rel="nofollow noreferrer">update API</a>, Here in every query we need to pass document ID in <code>API</code> (like <code>POST test/_doc/1/_update</code>). First i need to fetch <code>_id</code> and then i have to make update query with <code>POST test/_doc/{_id}/_update</code> </p>
  
  <p><br>
  It won't possible to every time produce <code>_id</code>. It didn't help me.<br> 
  I found another option to use <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html" rel="nofollow noreferrer">_update_by_query</a>. In which i got success by using following API:</p>
  
  <pre><code>curl -XPOST 'localhost:9200/my_index/my_type/_update_by_query?pretty' -H 'Content-Type: application/json' -d '
  {
     "query":{
        "term":{
           "userid":123
        }
     },
     "script":{
        "lang":"painless",
        "inline":"ctx._source.userid = params.value",
        "params":{
           "value":987
        }
     }
  }'
  </code></pre>
  
  <p>I am not finding any reference which shows how i can use <code>_update_by_query</code> with elasticserach-php client. Plus let me know if you guyz have better way to tackle this. Thanks!</p>