我在索引设置中添加了索引创建日期 下面
"settings" :{
"index" :{
"provided_name":"test",
"creation_Date":"1493750591836",
"number_of_shards" : "1",
"number_of_replicas" : "0"
}
}
但是当我尝试发布_template时会出现以下错误
"unknown setting [index.creation_date] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
这是否意味着创建时间设置不可用,请详细说明。我无法在中找到更多相关细节 https://twitter.com/Lexsa911/status/804008435020865536
使用的版本是5.1
答案 0 :(得分:2)
您不能设置该设置,只能读取它。但是,您可以使用mappings._meta
部分来存储自定义索引创建日期:
PUT my_index
{
"settings" :{
"index" :{
"number_of_shards" : "1",
"number_of_replicas" : "0"
}
},
"mappings": {
"test": {
"_meta": {
"creation_date":"1493750591836"
}
}
}
}