我想用动态模板创建索引并关闭字符串字段的分析。我已经为弹性搜索创建了查询,但是如何将其转换为 elastic4s 语句?(版本 elastic4s 1.3.x 是首选)
声明是:
PUT /myIndex
{
"mappings": {
"myType": {
"dynamic_templates": [
{
"templateName": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index" : "not_analyzed",
"omit_norms" : true
}
}
}
]
}}}
附言
可能可以通过执行这个“原始”请求来创建这个索引,但我没有找到如何使用 elastic4s 1.3.4 :(