当前位置: 首页 > news >正文

Elasticsearch-ik分析器

CLI 安装步骤
1、停止 Elasticsearch(如果正在运行): 在安装插件之前,确保 Elasticsearch 没有在运行。
命令:
systemctl stop elasticsearch2、安装插件: 使用 elasticsearch-plugin 命令安装 IK 插件。进入到你的es的安装目录:如/usr/local/software/elasticsearch
[root@localhost elasticsearch]# bin/elasticsearch-plugin install https://get.infini.cloud/elasticsearch/analysis-ik/8.17.0其中analysis-ik/8.17.0对应你自己安装es的版本warning: ignoring JAVA_HOME=/usr/local/software/jdk-21.0.5; using bundled JDK
-> Installing https://get.infini.cloud/elasticsearch/analysis-ik/8.17.0
-> Downloading https://get.infini.cloud/elasticsearch/analysis-ik/8.17.0
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.net.SocketPermission * connect,resolve
See https://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.Continue with installation? [y/N]y  (此处选择y)
-> Installed analysis-ik
-> Please restart Elasticsearch to activate any plugins installed3、查看ik分词器是否安装成功
[root@localhost elasticsearch]# curl -X GET "localhost:9200/_cat/plugins?v"
name                  component   version
localhost.localdomain analysis-ik 8.17.04、重启 Elasticsearch:安装完成后,重启 Elasticsearch 使插件生效。systemctl stop elasticsearch
systemctl start elasticsearch查看状态
systemctl status elasticsearch查看日志
journalctl -u elasticsearch -f5、查看日志载入插件里有个名为:loaded plugin [analysis-ik]cat /usr/local/software/elasticsearch/logs/elasticsearch.log[2025-07-25T13:28:57,460][INFO ][o.e.p.PluginsService     ] [localhost.localdomain] loaded plugin [analysis-ik]我是中国人,的ik分词情况{"tokens": [{"token": "我","start_offset": 0,"end_offset": 1,"type": "CN_CHAR","position": 0},{"token": "是","start_offset": 1,"end_offset": 2,"type": "CN_CHAR","position": 1},{"token": "中国人","start_offset": 2,"end_offset": 5,"type": "CN_WORD","position": 2},{"token": "中国","start_offset": 2,"end_offset": 4,"type": "CN_WORD","position": 3},{"token": "国人","start_offset": 3,"end_offset": 5,"type": "CN_WORD","position": 4}]
}
http://www.dtcms.com/a/297623.html

相关文章:

  • 【硬件】LT3763中文手册
  • 深入解析MongoDB分片原理与运维实践指南
  • 怎么放大单片机输出电流
  • k8s-MongoDB 副本集部署
  • vue2+node+express+MongoDB项目安装启动启动
  • pytest 测试报告生成方案有哪些?
  • Springboot整合springmvc
  • 基于Docker的GPU版本飞桨PaddleOCR部署深度指南(国内镜像)2025年7月底测试好用:从理论到实践的完整技术方案
  • 【赵渝强老师】MySQL中的数据库对象
  • 7月25号打卡
  • 海康监控集中管理解决方案全面分析
  • 设计仿真 | Simufact Forming模具疲劳分析助力预测模具寿命
  • 基于单片机的楼宇门禁系统的设计与实现
  • 目标导向的强化学习:问题定义与 HER 算法详解—强化学习(19)
  • [特殊字符] GitHub 2025年7月月度精选项目 Top5
  • Java NIO FileChannel在大文件传输中的性能优化实践指南
  • Movavi Video Editor v25.9.0 视频编辑软件中文特别版
  • Pytorch中cuda相关操作详见和代码示例
  • 【Chrome】下载chromedriver的地址
  • 线性代数 下
  • Chrome(谷歌)浏览器 数据JSON格式美化
  • JAVA知识点(六):性能调优与线上问题排查
  • vue+iview+i18n国际化
  • Day 3: 机器学习进阶算法与集成学习
  • 《Uniapp-Vue 3-TS 实战开发》自定义环形进度条组件
  • Zookeeper 3.6.3【详细技术讲解】整
  • Uniapp编写微信小程序,绘制动态圆环进度条
  • Welcome to the world of Go language
  • 鸿蒙端云一体化开发之创建和操作数据库
  • 内存 管理