How to find out the index created date in elastic search?
You can use the search API to search and aggregate data stored in Elasticsearch data streams or indices. The API's query request body parameter accepts queries written in Query DSL. The following request searches my-index-000001 using a match query. This query matches documents with a user.id value of kimchy .
Use Kibana to list indices for Elasticsearch. As with the terminal-based cURL requests, Kibana should return the status, name and UUID for each index.
To search multiple data streams and indices, add them as comma-separated values in the search API's request path. The following request searches the my-index-000001 and my-index-000002 indices. You can also search multiple data streams and indices using an index pattern.
By default, Elasticsearch indexes all data in every field and each indexed field has a dedicated, optimized data structure. For example, text fields are stored in inverted indices, and numeric and geo fields are stored in BKD trees.
Elasticsearch now automatically includes the creation date for an index, for example:
If I create a new index (with no settings)
curl -XPOST 'localhost:9200/aoeu'
{"acknowledged":true}
I can now 'get' the index to retrieve its metadata:
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": {}
}
}
You can see the creation_date
field above.
curl -XGET localhost:9200/_cat/indices?h=i,creation.date.string
Above command will output index name (i) and creation date. For more options you can try help as-
curl -XGET localhost:9200/_cat/indices?help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With