使用uuid的索引的索引设置中不存在ElasticsearchIllegalStateException [[index.version.created]:[null]]

时间:2014-12-29 08:33:28

标签: elasticsearch

我刚刚将弹性搜索升级到1.4.2,当我尝试按

创建索引时
curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{
    "user" : "kimchy",
    "post_date" : "2009-11-15T14:12:12",
    "message" : "trying out Elasticsearch"
}'

然后我收到了错误,

{"error":"IndexCreationException[[twitter] failed to create index]; nested: ElasticsearchIllegalStateException[[index.version.created] is not present in the index settings for index with uuid: [null]]; ","status":500}%

我应该如何设置索引设置?

1 个答案:

答案 0 :(得分:3)

似乎是迟到的答案,但您必须在Elasticsearch配置文件中添加index.version.created: %yourversion%条目(默认为 elasticsearch.yml )。

对于您的服务器版本,它将1040299不变。您可以在https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/Version.java查看此常量列表。然后你需要重启服务器。