声明:我使用的Elasticsearch的版本是5.4.0,安装分词器前请先安装maven
一:安装maven
https://github.com/apache/maven
说明:
安装maven需要java1.7+
编译安装分词器时,可能会报错,报错信息如下:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
解决方法:下载一个最新版的JDK就可以了,下载链接如下
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
二:安装中文分词器IK
https://github.com/medcl/elasticsearch-analysis-ik
三:安装拼音分词器pinyin
https://github.com/medcl/elasticsearch-analysis-pinyin
安装方法和安装中文分词器的方法一样
时间: 2024-12-27 10:29:00