es 创建索引用

#ik_max_word搜索用ik_smart
$ curl -X PUT 'localhost:9200/accounts' -d '

{
"mappings": {
"properties": {
"user": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"title": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"desc": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
}
}
}
}

'

 

posted @ 2020-05-07 18:02  酷酷的城池  阅读(1125)  评论(0编辑  收藏  举报