elasticsearch/elasticsearch — Issue #1607: Update API: update by query
Author: monken
Created: 2012-01-12 19:36:40+00:00
State: open

#1583 allows to update individual documents. Update by query will reduce the network roundtrips radically if you want to update a number of documents and push work from the client to ES.

````
curl -XPOST localhost:9200/index/type/_update -d '{
"query" : { "constant_score" : { "filter" : { "term" : { "counter" : 0 } } } },
"script" : "ctx._source.counter += count",
"params" : {
"count" : 4
}
}'
'
````