Any takers? David Pilato?
On Friday, August 29, 2014 10:33:23 AM UTC+1, [email protected] wrote: > > Hi > Say I have a list of elements like this: > > PUT twitter/twit/1 > { > "list": [ > { > "a": "b", > "c": "d", > * "e": "f"* > }, > { > "1": "2", > "3": "4" > } > ] > } > > And I want to change the value of "e" (currently "f") to say "new_f " such > that the document looks like: > > { > "list": [ > { > "a": "b", > "c": "d", > * "e": "new_f"* > }, > { > "1": "2", > "3": "4" > } > ] > } > > Is there a way to do this ? Maybe in MVEL ? > > Do I match on document > { > "a": "b", > "c": "d", > "e": "f" > } > > ie if list.contains(document) { some kind of update; } // is this > possible ? > > > I know MVEL is being deprecated in 1.4 however it will do for now. > > I want to use bulk request. > > I know it's possible to remove the element like this: > bulkRequestBuilder.setScript("if (ctx._source.list.contains(document)) > {ctx._source.list.remove(document)} }").setScriptParams etc > > > but is it possible to "update" a field in the document also ? > > Thanks. > > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/571fa34d-f7fa-4f17-81c2-1288a0357d68%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
