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

**URL:** <https://discuss.elastic.co/t/is-it-safe-to-store-custom-user-data-within-an-indexs-settings-field/62524>\
**Category:** Elasticsearch\
**Created:** [October 7, 2016, 6:39pm UTC](https://discuss.elastic.co/t/is-it-safe-to-store-custom-user-data-within-an-indexs-settings-field/62524 "2016-10-07T18:39:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwthompson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kwthompson/32/12353_2.png) [@kwthompson](https://discuss.elastic.co/u/kwthompson)\
**Post date:** [October 7, 2016, 6:39pm UTC](https://discuss.elastic.co/t/is-it-safe-to-store-custom-user-data-within-an-indexs-settings-field/62524/1 "2016-10-07T18:39:02Z")

</div>

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

```auto
"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.

-keith

---

<div class="post-metadata">

**Author:** ![abeyad](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@abeyad](https://discuss.elastic.co/u/abeyad)\
**Post date:** [October 7, 2016, 7:18pm UTC](https://discuss.elastic.co/t/is-it-safe-to-store-custom-user-data-within-an-indexs-settings-field/62524/2 "2016-10-07T19:18:43Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![kwthompson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kwthompson/32/12353_2.png) [@kwthompson](https://discuss.elastic.co/u/kwthompson)\
**Post date:** [October 7, 2016, 7:45pm UTC](https://discuss.elastic.co/t/is-it-safe-to-store-custom-user-data-within-an-indexs-settings-field/62524/3 "2016-10-07T19:45:34Z")

</div>

That's what I was afraid of. ☹ 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.

-keith

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:13pm UTC](https://discuss.elastic.co/t/is-it-safe-to-store-custom-user-data-within-an-indexs-settings-field/62524/4 "2017-07-05T22:13:59Z")

</div>


