[FEATURE] Support for Dynamic Template Variables
Is your feature request related to a problem?
OpenSearch supports usage of Dynamic Template Variables (for e.g., {dynamic_type}), but the opensearch-java client does not have an option for it in this Property class: https://github.com/opensearch-project/opensearch-java/blob/v2.4.0/java-client/src/main/java/org/opensearch/client/opensearch/_types/mapping/Property.java. For example, I would like to add a template variable in this dynamic template like so:
{
"mappings": {
"dynamic_templates": [
{
"strict_mappings": {
"mapping": {
"type": "{dynamic_type}",
"dynamic":"strict"
},
"match":"*"
}
}
]
}
}
What solution would you like?
Add support for template variables, so they can be used when creating dynamic templates.
What alternatives have you considered?
In my specific case, I can use "dynamic" : "strict" on the root object to not allow adding any new dynamic fields. So, the alternatives can vary based on your specific circumstance.
Do you have any additional context?
For the context, https://www.elastic.co/guide/en/elasticsearch/reference/7.10/dynamic-templates.html#template-variables