Is it possible to annotate an index with custom properties

Hello,

I am experimenting with index settings and mappings, and I would would like to know whether it is possible to store in the index settings, which version of the mappings are used in this particular index. This would also be useful when mappings evolve in the future - I would like to be able to know what version of settings an index was created with.

I tried adding a custom setting when creating the index:

{
    "analysis": {
        ...
    },
    "custom": {
        "version": "1.0.1"
    },
    "index": {
        "number_of_replicas": 1,
        ...
    }
}

but Elasticsearch rejects those settings with

ElasticsearchStatusException[Elasticsearch exception [type=illegal_argument_exception, reason=unknown setting [index.custom.version] please check that any required plugins are installed, or check the breaking changes documentation for removed settings]

]

Is there any way to add custom settings, or a custom section in the settings, that will be ignored by Elastic, but can be retrieved as part of the index settings?

Thanks -Andreas

You can put custom meta data on the mapping for the index

That is exactly what I was looking for. Works like a charm.
Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.