下载安装 到/mydata/elasticsearch/config 下面直接解压ik 之后重启es 测试 post _analyze?{ text:中华人民共和国, analyzer:ik_smart}{ tokens: [ { token: 中华, start_offset: 0, end_offset: 2, type: CN_WORD, position: 0 },
下载安装
到/mydata/elasticsearch/config 下面直接解压ik 之后重启es
测试
post _analyze? { "text":"中华人民共和国", "analyzer":"ik_smart" } { "tokens": [ { "token": "中华", "start_offset": 0, "end_offset": 2, "type": "CN_WORD", "position": 0 }, { "token": "人民", "start_offset": 2, "end_offset": 4, "type": "CN_WORD", "position": 1 }, { "token": "共和国", "start_offset": 4, "end_offset": 7, "type": "CN_WORD", "position": 2 } ] }ElasticSearch-分词-自定义扩展词库
先下载nginx
cd /mydata mkdir nginx 启动nginx (没有会去下载) docker run -p 80:80 --name nginx -d nginx:1.10 复制 nginx docker container cp nginx:/etc/nginx . 从命名nginx mv nginx conf 停止docker stop nginx 删除docker rm nginx 创建 docker run -p 80:80 --name nginx \ -v /mydata/nginx/html:/usr/share/nginx/html \ -v /mydata/nginx/logs:/var/log/nginx \ -v /mydata/nginx/conf:/etc/nginx \ -d nginx:1.10 wqg Mall 能显示就可 创建 ex/fenci.txt 访问http://192.168.56.10/es/fenci.txt