Lee*_*e H 13
Elasticsearch现在自动包含索引的创建日期,例如:
如果我创建一个新索引(没有设置)
curl -XPOST 'localhost:9200/aoeu'
{"acknowledged":true}
Run Code Online (Sandbox Code Playgroud)
我现在可以'获取'索引来检索其元数据:
curl -XGET 'localhost:9200/aoeu'
{
"aoeu": {
"aliases": {},
"mappings": {},
"settings": {
"index": {
"creation_date": "1429308615170",
"number_of_replicas": "1",
"number_of_shards": "5",
"uuid": "C5sqwXClSFyd5uF3MSrVgg",
"version": {
"created": "1050199"
}
}
},
"warmers": {}
}
}
Run Code Online (Sandbox Code Playgroud)
你可以看到creation_date上面的字段.
curl -XGET localhost:9200/_cat/indices?h=i,creation.date.string
上面的命令将输出索引名称 (i)和创建日期。有关更多选项,您可以尝试帮助作为-
curl -XGET localhost:9200/_cat/indices?help
| 归档时间: |
|
| 查看次数: |
10375 次 |
| 最近记录: |