1
我想在elasticsearch中運行一個簡單的更新腳本。 它似乎與mvel很好地工作,但不與python。彈性搜索python腳本插件更新API
curl -XPOST 'localhost:9200/index1/type1/1/_update?pretty=true'
-d '{"script" : "ctx._source.myfield=\"item\""}'
{
"ok" : true,
"_index" : "index1",
"_type" : "type1",
"_id" : "1",
"_version" : 7
}
curl -XPOST 'localhost:9200/index1/type1/1/_update?pretty=true'
-d '{"script" : "ctx._source.myfield=\"item\"","lang":"python"}'
{
"error" : "ElasticSearchIllegalArgumentException[failed to execute script]; nested: NullPointerException; ",
"status" : 400
}
我的ES版本是0.20.4
我elasticsearch琅蟒蛇插件1.1.0(我也試圖與1.2.0)
謝謝!有效!!!! – eran 2013-03-20 07:43:08