Hi,
is it possible to use dynamic_templates
?
opensearch_version: “1.3.3”
The objective: set type text to any fields in path log_processed.data.*
If I set the type statically (like second test-2) it works as expected. But I would like to be able to set type dynamically, because it is not known what fields will be in the future.
The first example test-1 doesn’t work as expected. And I don’t know why
PUT _index_template/test-1
{
"index_patterns" : [
"test-*"
],
"template" : {
"mappings" : {
"dynamic_templates" : [
{
"log_processed.data" : {
"match_pattern" : "regex",
"match" : "^log_processed.data.*",
"match_mapping_type":"*",
"mapping" : {
"type" : "text"
}
}
}
]
}
}
}
PUT _index_template/test-2
{
"index_patterns" : [
"test-*"
],
"template" : {
"mappings" : {
"properties": {
"log_processed.data.a": {
"type" : "text"
}
}
}
}
}
Maybe I didn’t configure something else? Or maybe I did something wrong? Is it even possible to use dynamic_templates?