Apply same settings on all fields that start with the same name in the index template in the Elasticsearch

n my Elasticsearch index, there is a field for example field_abc that is an object. The problem is that multiple fields with name field_abc can exist with different suffix. Like in our index in the same document field_abc_1, field_abc_2, field_abc_3 can exist. The number of such fields is not fixed and can be different in multiple documents. The structure of the object inside these fields is the same. Now in my template settings of this index, how can I make sure that same settings are applied on each such field? For example, in my index template right now I have following settings for the field_abc

"field_abc": {
                "properties": {
                    "item": {"type": "keyword"},
                    "data": {"type": "keyword"},
                    "description": {"type": "keyword"},
                    "flag": {"type": "boolean"}

As I have discussed above, I have multiple such fields that start with name field_abc in my document and the number of such fields is not fixed. So I want to ask that how can I have a dynamic and same settings for all those fields in my index that start with the name field_abc? Kindly guide me in this regard.

You can use wildcards in mappings, see Dynamic templates | Elasticsearch Guide [8.0] | Elastic

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