spring-data-opensearch icon indicating copy to clipboard operation
spring-data-opensearch copied to clipboard

[BUG] Dynamic mapping type "strict_allow_templates" does not exists for @Document Annotation.

Open Xyaren opened this issue 1 year ago • 1 comments

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.

Xyaren avatar Oct 15 '24 10:10 Xyaren

[Catch All Triage - 1, 2]

dblock avatar Nov 04 '24 17:11 dblock