Is it safe to store custom user data within an index's 'settings' field?

If I add my own custom settings data within the 'settings' field when creating an index, Elasticsearch does store the information. Example:

"settings": {
  "index": {

    "user_data": {
      "foo": "bar"

    "number_of_shards": "3",
    "creation_date": "1475863995865",
    "number_of_replicas": "0",
    "uuid": "40nWJudAQp-4w7atL_wi0w",
    "version": {
      "created": "2040099"

I'm mostly curious if anyone has tried this and if it is safe to do so. My concern is that certain operations in Elasticsearch will result in my data getting discarded later. Does it always copy the entire block of settings data?

Any insight is appreciated.


I would not rely on this, and Elasticsearch 5.0 is much stricter in terms of settings parsing and only allows settings that are known to the system (giving you suggestions in case you misspelled a setting).

That's what I was afraid of. :frowning: It would be nice to have a supported field provided by Elasticsearch for such a purpose. There is some meta data about an index that we currently store in it's own index but managing this meta data becomes a pain when reindexing or migrating data to a new cluster. It would be nice to have it as actual data stored on the index.

Thanks for the input.