我刚刚将弹性搜索升级到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}%
我应该如何设置索引设置?
答案 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查看此常量列表。然后你需要重启服务器。