spring-data-opensearch
spring-data-opensearch copied to clipboard
[BUG] Dynamic mapping type "strict_allow_templates" does not exists for @Document Annotation.
What is the bug?
The feature was implemented in https://github.com/opensearch-project/OpenSearch/pull/14555. I can not use this option when generating the mapping using spring because the enum value does not exist:
@Document(indexName = "#{@environment.getProperty('opensearch.index.relations.name')}",
versionType = Document.VersionType.INTERNAL,
dynamic = Dynamic.STRICT_ALLOW_TEMPLATES, // <--------- Here
writeTypeHint = WriteTypeHint.FALSE)
@Setting(settingPath = "os/relation.settings.json")
@DynamicTemplates(mappingPath = "os/relation.dynamic-templates.json")
public class RelationDocument {
The same applies on a field basis:
@Field(type = FieldType.Object, dynamic = Dynamic.STRICT_ALLOW_TEMPLATES)
private LocalizedString localName;
What is the expected behavior?
I can select the option.
[Catch All Triage - 1, 2]