title: How to update multiple documents that match a query in elasticsearch
body: <p>I have documents which contains only "url"(analyzed) and "respsize"(not_analyzed) fields at first. I want to update documents that match the url and add new field "category"
  I mean;
  at first doc1:</p>
  
  <pre><code>{
   "url":"http://stackoverflow.com/users/4005632/mehmet-yener-yilmaz",
   "respsize":"500"
  }
  </code></pre>
  
  <p>I have an external data and I know "stackoverflow.com" belongs to category 10,
  And I need to update the doc, and make it like:</p>
  
  <pre><code>{
   "url":"http://stackoverflow.com/users/4005632/mehmet-yener-yilmaz",
   "respsize":"500",
   "category":"10"
  }
  </code></pre>
  
  <p>Of course I will do this all documents which url fields has "stackoverflow.com"
  and I need the update each doc oly once.. Because category data of url is not changeable, no need to update again.
  I need to use _update api with _version number to check it but cant compose the dsl query.
  <strong>EDIT</strong>
  I run this and looks works fine:
  <a href="https://i.stack.imgur.com/R53Q7.png"><img src="https://i.stack.imgur.com/R53Q7.png" alt="enter image description here"></a>
  But documents not changed..
  <a href="https://i.stack.imgur.com/AFjSc.png"><img src="https://i.stack.imgur.com/AFjSc.png" alt="enter image description here"></a></p>
  
  <p>Although query result looks true, new field not added to docs, need refresh or etc?</p>