I would like to update an existing document that has an array from 
elasticsearch hadoop.

I notice that I can do that from curl directly, for example:

PUT arraydemo/temp/1
{
  "counter" : 1,
  "tags" : [ "I am an array", "With Multiple values" ],
  "more_tags" : [ "I am a tag" ],
  "even_more_tags": "I am a tag too!"
}

GET arraydemo/temp/1

POST arraydemo/temp/1/_update
{
  "script" : "tmp = new HashSet(); tmp.addAll(ctx._source.tags); 
tmp.addAll(new_tags); ctx._source.tags = tmp.toArray()",
  "params" : {
    "new_tags" : [ "add me", "and me" ]
  }
}


However, elasticsearch-hadoop appears to be unable to parse array 
parameters, such that an upsert operation from within elasticsearch hadoop 
using the same script and a document with the same JSON for parameters 
fails.

I created an issue on github (elasticsearch hadoop (#223)), but thought I 
should post here for ideas or in case there's a workaround that someone 
might know of.

James Campbell

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/70608cbd-5a4d-424e-b04e-6daee8ac0635%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to