如何在Elasticsearch中使用_cat/indices API显示索引创建时间

dap*_*mao 25 elasticsearch

我使用Elasticsearch 5.2,并不能看到index creation timehttp://localhost:9200/_cat/indices?v.

只是想知道index creation time每个指数会显示哪些选项.

nik*_*shr 43

看看cat API:您可以通过获取可用参数列表http://localhost:9200/_cat/indices?help

要获取索引的创建日期,您可以使用creation.date(或creation.date.string).例如,使用

http://localhost:9200/_cat/indices?h=h,s,i,id,p,r,dc,dd,ss,creation.date.string
Run Code Online (Sandbox Code Playgroud)

  • @VedranMaricevic对于ES5,附加`&s = creation.date`,类似`http:// localhost:9200/_cat/indices?h = h,s,i,id,p,r,dc,dd,ss,creation .date.string&S = creation.date` (7认同)
  • 如何按创建日期对索引进行排序? (2认同)