Get all index created before ES 5.0

Asked by At

I need to get information about all indicies created before ES5.0. i try to get info with:

curl -XGET 'localhost:9200/_cat/indices?v&pretty'

but in the response I don't have ES version of index. I planing migration to ES6.7 and I want to reindex old indexes.

1 Answers

Chr0nicl3 On Best Solutions

for getting the version on the index you can use the following curl

curl -XGET {host}:{port}/{index}/_settings?pretty

your required information will be in "version" key, for my index which was created with ES 6.5 -

"version" : {
          "created" : "6050499"

for getting information on all the indices you can drop the {index} part and your curl would look like -

curl -XGET {host}:{port}/_settings?pretty