天天看点

Elasticsearch——》测试:中文分词器插件es-ik的自定义词库

请参考:总结——》【Elasticsearch】

系统System

:Linux

版本version

:elasticesearch7.6

根目录rootPath

:/opt/app/elasticesearch7.6
Elasticsearch——》测试:中文分词器插件es-ik的自定义词库

一、使用默认词库分词

POST _analyze
{
  "analyzer": "ik_max_word",
  "text":"老铁"
}

POST _analyze
{
  "analyzer": "ik_max_word",
  "text":"没毛病"
}

           
Elasticsearch——》测试:中文分词器插件es-ik的自定义词库

二、使用自定义词库分词

参考:Elasticsearch——》中文分词器插件es-ik的自定义词库
POST _analyze
{
  "analyzer": "ik_max_word",
  "text":"老铁"
}

POST _analyze
{
  "analyzer": "ik_max_word",
  "text":"没毛病"
}

           
Elasticsearch——》测试:中文分词器插件es-ik的自定义词库

继续阅读