wag*_*oon 6 mapping elasticsearch elasticsearch-mapping elasticsearch-template
我有这个文件
{
"text_foo": "lorem ipsum",
"one":{
"two":{
"three":{
"text_bar": "dolor sit amet"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我想要完成的事情:我需要动态模板,它将匹配以“text_”开头的任何属性示例:
"mappings" : {
"dynamic_templates":[
{
"text":{
"match": "text_*",
"path_match": "*.text_*",
"match_mapping_type": "*",
"mapping":{"type":"text","analyzer":"myCustomAnalyzer"}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
"match"和可以"path_match"一起使用吗?(就像我的例子一样)
会"path_match":"*.text_*"匹配整个路径"one.two.three.text_*"还是仅匹配“one.text_*”?
也会"path_match":"*.text_*"匹配 root 属性吗"text_foo"?
如果唯一的解决方案是使用正则表达式 ( "match_pattern":"regex"),则正则表达式将匹配整个路径"one.two.three.text_bar"还是仅匹配"text_bar"?
| 归档时间: |
|
| 查看次数: |
674 次 |
| 最近记录: |