Documentation for dynamic template mappings?

Thanks for answering this quickly.

Yes, I am specifically looking for a more complete description of this dynamic mapping templates feature.
The best I managed to find is Dynamic templates | Elasticsearch Guide [8.3] | Elastic, but it looks incomplete. For example it claims that Dynamic templates are specified as an array of named objects: like this:

"dynamic_templates": [
    {
      "my_template_name": { 
        ... match conditions ... 
        "mapping": { ... } 
      }
    },

But actually the "mapping" part is not mandatory at all. On the other hand there could be a "runtime" section that is not mentioned in the syntax (and its presence actually forbids "mapping" from being present). I am looking for details like this.


Well, concretely I am trying to ossify/formalize the currently known mappings without losing the agility of a fresh ES installation when it comes to processing of previously unknown fields.
I do not like "dynamic": "enabled", because that does not provide an easy way for kibana users to see that a field is prone to conflicts and/or changes because its type is not fixed.
I also do not like "dynamic":"runtime", because that does not provide adequate performance. The moment the users of the kibana notice the new field, they will expect full performace of it.


A perfect solution would be to have "dynamic": "enabled" but somehow mark the dynamically added fields in a way that alerts users of kibana that this field is not set in stone and may change.

For example I hoped to create a subfield "fieldname.autodetected" and prevent the "fieldname" field from being mapped at all (like Mapping: trying to ignore 'field' but keeping 'field.raw' asks), but found no way to do that. I know I can make the "fieldname" field unindexed, but that will both confuse the users AND occupy two slots out of the 1000-field-limit instead of one.

I could tolerate the "fieldname" field being a runtime field and "fieldname.autodetected" being a normal field, but I do not see any example for this either.

Thus, I was hoping somebody could point me to a more complete documentation where I could find these things.