Skip to content

ik-custom融合了两个开源项目,用于es自定义ik分词器加上es动态同义词过滤器

License

Notifications You must be signed in to change notification settings

undergrowthlinear/elasticsearch-analysis-ik-custom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elasticsearch-analysis-ik-custom

使用示例

  • 当将此插件安装在es中后,使用如下方式创建索引同时设置索引的配置信息
  • postman中使用 put方法 http://localhost:9200/testindex
{
  "index": {
    "analysis": {
      "analyzer": {
        "by_synonym_smart": {
          "type": "custom",
          "tokenizer": "ik_smart",
          "filter": ["by_tfr","remote_synonym"],
          "char_filter": [
            "by_cfr"
          ]
        },
        "by_synonym_max_word": {
          "type": "custom",
          "tokenizer": "ik_max_word",
          "filter": ["by_tfr","remote_synonym"],
          "char_filter": [
            "by_cfr"
          ]
        }
      },
      "filter": {
        "by_tfr": {
          "type": "stop",
          "stopwords": [" "]
        },
        "remote_synonym": {
          "type" : "dynamic_synonym",
        "synonyms_path" : "http://可访问文件地址",
        "interval": 21600
        }
      },
      "char_filter": {
        "by_cfr": {
          "type": "mapping",
          "mappings": ["| => |","- => "]
        }
      }
    }
  }
}

About

ik-custom融合了两个开源项目,用于es自定义ik分词器加上es动态同义词过滤器

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages