How to find out the index created date in elastic search?
            Asked
            
        
        
            Active
            
        
            Viewed 2.2k times
        
    4 Answers
16
            
            
        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.
 
    
    
        Lee H
        
- 5,147
- 4
- 19
- 22
- 
                    7You can paste this number in https://www.epochconverter.com/ to get a date quickly. – OmarOthman Jul 14 '17 at 11:17
6
            
            
        
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
 
    
    
        Yogesh Jilhawar
        
- 5,605
- 8
- 44
- 59
1
            
            
        From the 1.4.0 version, documentation explains the following: Index creation date
When an index is created, a timestamp is stored in the index metadata for the creation date. By default this it is automatically generated but it can also be specified using the creation_date parameter on the create index API
curl -XPUT localhost:9200/test -d '{
    "creation_date" : 1407751337000 
}'
 
    
    
        jeromes
        
- 497
- 5
- 17
0
            
            
        - 
                    3AFAIU It is not about document creation time, it is about index creation time. – Eduard Kibort Apr 17 '14 at 15:52
 
     
    