gpt4 book ai didi

java - 如何在elasticsearch中找出索引创建日期

转载 作者:搜寻专家 更新时间:2023-10-30 19:59:19 24 4
gpt4 key购买 nike

elasticsearch如何查看索引创建日期?

最佳答案

Elasticsearch 现在自动包含索引的创建日期,因为示例:

如果我创建一个新索引(没有设置)

curl -XPOST 'localhost:9200/aoeu'
{"acknowledged":true}

我现在可以“获取”索引以检索其元数据:

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": {}
}
}

你可以看到上面的 creation_date 字段。

关于java - 如何在elasticsearch中找出索引创建日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21872448/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com