elasticsearch安装ik分词

参考 https://blog.csdn.net/wwd0501/article/details/78258274
1.下载地址
ik分词地址 (https://github.com/medcl/elasticsearch-analysis-ik/releases/tag/v5.5.1)

2.查询
curl localhost:9200/_cat/plugins 查询安装的分词
http://localhost:9200/_analyze?analyzer=ik_smart&text=无花果支付宝

3.使用
3.1 创建索引
查询已有索引 curl localhost:9200/_cat/indices?v
创建索引 curl -XPUT localhost:9200/knowledge
创建映射 curl -XPOST localhost:9022/konwledge/student/_mapping -d "{"student":{"properties":{"name":{"type":"text","analyzer":"ik_max_word","search_analyzer":"ik_smart"},"age":{"type": "long"}}}}"

猜你喜欢

转载自www.cnblogs.com/bob-coder/p/11569922.html