Я пытаюсь создать шаблон следующим образом:
PUT _template/test
{
"index_patterns": ["test_\\d{4}\\d{2}\\d{2}"],
"settings":{
"number_of_shards": 1
},
"aliases": {
"test_daily": {}
}
}
Но эта операция кажется неподдерживаемой ES.
Ответ:
{
"error": {
"root_cause": [
{
"type": "invalid_index_template_exception",
"reason": "index_template [test] invalid, cause [Validation Failed: 1: template must not contain the following characters [ , \", *, \\, <, |, ,, >, /, ?];]"
}
],
"type": "invalid_index_template_exception",
"reason": "index_template [test] invalid, cause [Validation Failed: 1: template must not contain the following characters [ , \", *, \\, <, |, ,, >, /, ?];]"
},
"status": 400
}
Я знаю, что могу создать index_patterns с "index_patterns":["test_*"]
Но мне интересно, возможно ли добавить более конкретные регулярные выражения в поле шаблона index_patterns, как это возможно в dynamic_template
для отображений.