ElasticSearch使用自定义词库

使用自定义词库,我们需要首先找到配置文件:

路径:D:\elasticsearch-5.1.1\plugins\analysis-ik\config

 

然后打开我们的配置文件:

IKAnalyzer.cfg.xml

 

ElasticSearch5.1.1使用自定义词库

比如我要把圣诞果作为一个词写入自定义分词器:

 

那么我们打开:

D:\elasticsearch-5.1.1\plugins\analysis-ik\config

下面的【custom】文件夹内的ext_stopword.dic 文件

添加新的词:圣诞果  即可

ElasticSearch5.1.1使用自定义词库

 

需要重启ES服务,这个词才会有效哦,这里主要是提供分词或者同义词使用。

相关文章:

  • 2021-11-18
  • 2021-06-22
  • 2021-06-05
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-07
  • 2021-04-21
  • 2022-12-23
  • 2021-06-12
  • 2021-04-21
相关资源
相似解决方案