0

当我尝试运行 curl 命令时,例如:

curl -s -XPOST localhost:9200/_bulk --data-binary "@bulk_prova.elastic"; echo

其中 bulk_prova.elastic 是:

{ "update" : {"_id" : "1", "_type" : "type1", "_index" : "indexName"} }{ "script" : "ctx._source.topic = \"topicValue\""}

我收到了这个错误

{"took":19872,"errors":true,"items":[{"update":{"_index":"indexName","_type":"type1","_id":"1","status":400,"error":{"type":"illegal_argument_exception","reason":"failed to execute script","caused_by":{"type":"script_exception","reason":"scripts of type [inline], operation [update] and lang [groovy] are disabled"}}}}]}

我搜索解决了这个问题,我已经管理了 elasticsearch.yml 文件以启用动态脚本,但是每次我尝试更改文件并在重新启动 elasticsearch 服务时停止弹性,它都不会启动。

由于这种奇怪的行为,我不知道如何解决这个问题。

我有 2.2.0 版本,我的目的是向索引添加一个字段(现在)或多于一个索引(一旦问题解决)

4

1 回答 1

1

在 Elasticsearch 2.3 中,它已从以下位置修改:

script.disable_dynamic: 假

至:

script.file: true script.indexed: true

于 2016-06-07T14:13:06.267 回答