Update multiple docs based on a query

Hey all,

Is it possible to update documents based on a query, simialar to mongodb update query.
I mean, smt like:
{
query: {
bool: {
must: [
{
term: {
text: "apple"
}
}
]
}
},
update:{
set: {
tag : "fruit"
}
}
}
I can query first, than update each doc with its id, but it takes too long. There should be a better solution.

Thanks.

Update by query is not implemented yet but there is an opened issue
for it Update API: update by query · Issue #1607 · elastic/elasticsearch · GitHub

On Sat, Jun 16, 2012 at 11:03 AM, feridcelik feridcelik@gmail.com wrote:

Hey all,

Is it possible to update documents based on a query, simialar to mongodb
update query.
I mean, smt like:
{
query: {
bool: {
must: [
{
term: {
text: "apple"
}
}
]
}
},
update:{
set: {
tag : "fruit"
}
}
}
I can query first, than update each doc with its id, but it takes too long.
There should be a better solution.

Thanks.

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Update-multiple-docs-based-on-a-query-tp4019410.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
Benjamin DEVEZE