【发布时间】:2016-06-25 01:35:10
【问题描述】:
我想用动态模板创建索引并关闭对字符串字段的分析。我已经为弹性搜索创建了查询,但是如何将其转换为 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 来创建这个索引:(
【问题讨论】:
标签: scala elasticsearch elastic4s