好的想法是十分钱一打,真正无价的是能够实现这些想法的人。

mapping index 不分词怎么设置

Elasticsearch | 作者 applecugb | 发布于2017年07月19日 | 阅读数:13659

PUT /my_store
{
"mappings" : {
"products" : {
"properties" : {
"productID" : {
"type" : "text",
"index" : "not_analyzed"
}
}
}
}

}
版本:5.4.3  提示:not_analyzed已废弃,只能是true和false,这样的话不分词怎么设置?
已邀请:

laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net

赞同来自: shinehiy occultskyrong

1.x 2.x版本设置 no not_analyzed即可。
5.xstring分为两种类型keyword,text。如果不想分词,用keyword即可。

shinehiy

赞同来自:

 the keyword field for not-analyzed exact string values https://www.elastic.co/guide/e ... .html

要回复问题请先登录注册