1

I have added the index creation date in my index setting as below

"settings" :{ 
  "index" :{ 
     "provided_name":"test",
     "creation_Date":"1493750591836",
     "number_of_shards" : "1",
     "number_of_replicas" : "0"
  }
 }

But when i try to post the _template am getting error as below

  "unknown setting [index.creation_date] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"

Does it means the creation time setting is not available, could any please clarify. Am not able to find more details on this in
https://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-update-settings.html

The version used is 5.1

0

1 Answer 1

3

You're not allowed to set that setting, only read it. However, what you can do is to use the mappings._meta section for that in order to store your custom index creation date:

PUT my_index
{
  "settings" :{ 
   "index" :{ 
     "number_of_shards" : "1",
     "number_of_replicas" : "0"
    }
  },
  "mappings": {
    "test": {
      "_meta": { 
        "creation_date":"1493750591836"
      }
    }
  }
}
Sign up to request clarification or add additional context in comments.

3 Comments

thanks for the info. How about provided_name & version of index , if am using a template how the index will know it should follow the template. Is there way i specify the template which it should refer at the time of index creation ?
In the template there is a property called "template" which should capture the index name. If the index you're creating matches that template name, then the template will be applied.
Thanks val that clarifies things.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.