如何修改 elasticsearch analysis-icu 的字典呢?
Install java-1.8,apache-ant
mkdir /src
cd /src
git clone https://github.com/unicode-org/icu.git
git checkout release-62-2
cd /src/icu/icu4c/source
#modify dict
vim data/brkitr/dictionaries/thaidict.txt
ICU_DATA_BUILDTOOL_OPTS=--include_uni_core_data ./runConfigureICU Linux
make ICU4J_ROOT=/src/icu/icu4j JDK_BIN="/usr/lib/jvm/java-1.8-openjdk/bin" icu4j-data-install
cd /src/icu/icu4j
mkdir estest ; cd estest
wget https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-7.3.2.zip
unzip analysis-icu-7.3.2.zip
cp ../icu4j.jar icu4j-62.1.jar
zip new-analysis-icu.zip ./*
沒有留言:
張貼留言