【发布时间】:2013-03-20 09:04:36
【问题描述】:
我正在尝试在 elasticsearch 中运行一个简单的更新脚本。 它似乎在 mvel 上工作得很好,但在 python 上却不行。
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-lang-python 插件是 1.1.0(我也试过 1.2.0)
【问题讨论】:
标签: elasticsearch