I would like to partial update documents per query.
Seems this is not implemented in ES yet, the only way is to use the update
by query plug-in.
I checked the example in above site, and know how to update numeric field
by script:
curl -XPOST 'localhost:9200/twitter/_update_by_query' -d '{ "query" : { "term" : { "message" : "you" } }, "script" : "ctx._source.likes += 1"}'
But I still have no idea how to update a text field by query. Example, if I
have a following doc:
{"title":"hello", "text":"my text"}
I like something like this:
{
"query" : {
"match" : {
"title" : "hello"
}
},
"doc" : {
"text" :"new text"
}
}
How can I do?
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f817d995-e5e0-46a0-8f00-49281f8cacb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.