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.
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.
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+unsubscribe@googlegroups.com.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.