Creation_date 用于 elasticsearch 中的索引
Creation_date for index in elasticsearch
我在我的索引设置中添加了索引创建日期作为
以下
"settings" :{
"index" :{
"provided_name":"test",
"creation_Date":"1493750591836",
"number_of_shards" : "1",
"number_of_replicas" : "0"
}
}
但是当我尝试 post _template 时出现如下错误
"unknown setting [index.creation_date] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
是否表示创建时间设置不可用,请问有没有可以说明的。我无法在
中找到更多详细信息
https://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-update-settings.html
使用的版本是5.1
您不能设置该设置,只能阅读它。但是,您可以使用 mappings._meta
部分来存储您的自定义索引创建日期:
PUT my_index
{
"settings" :{
"index" :{
"number_of_shards" : "1",
"number_of_replicas" : "0"
}
},
"mappings": {
"test": {
"_meta": {
"creation_date":"1493750591836"
}
}
}
}
我在我的索引设置中添加了索引创建日期作为 以下
"settings" :{
"index" :{
"provided_name":"test",
"creation_Date":"1493750591836",
"number_of_shards" : "1",
"number_of_replicas" : "0"
}
}
但是当我尝试 post _template 时出现如下错误
"unknown setting [index.creation_date] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
是否表示创建时间设置不可用,请问有没有可以说明的。我无法在
中找到更多详细信息
https://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-update-settings.html
使用的版本是5.1
您不能设置该设置,只能阅读它。但是,您可以使用 mappings._meta
部分来存储您的自定义索引创建日期:
PUT my_index
{
"settings" :{
"index" :{
"number_of_shards" : "1",
"number_of_replicas" : "0"
}
},
"mappings": {
"test": {
"_meta": {
"creation_date":"1493750591836"
}
}
}
}