Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support for Dynamic Template Variables #585

Open
cpatel-r7 opened this issue Jul 25, 2023 · 1 comment
Open

[FEATURE] Support for Dynamic Template Variables #585

cpatel-r7 opened this issue Jul 25, 2023 · 1 comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@cpatel-r7
Copy link

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?

@cpatel-r7 cpatel-r7 added enhancement New feature or request untriaged labels Jul 25, 2023
@reta reta added bug Something isn't working and removed untriaged labels Jul 25, 2023
@reta
Copy link
Collaborator

reta commented Jul 25, 2023

@wbeckler wbeckler added the good first issue Good for newcomers label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants