Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Integrate ansj analyzer(https://github.com/ansjsun/ansj_seg) into elasticsearch
Java
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
src
.gitignore
README.md
pom.xml

README.md

Ansj Analysis for ElasticSearch

The Ansj Analysis plugin(https://github.com/ansjsun/ansj_seg) integrates Lucene Ansj analyzer into elasticsearch, support customized dictionary.

Version

master | 0.19.4 -> master
1.0.0 | 0.19.4 -> master

Install

In order to install the plugin, simply run:

cd bin
plugin -install laigood/elasticsearch-analysis-ansj/1.0.0

also download the dict files,unzip these dict file to your elasticsearch's config folder,such as: your-es-root/config/ansj

cd config
wget http://github.com/downloads/laigood/elasticsearch-analysis-ansj/ansj.zip --no-check-certificate
unzip ansj.zip
rm ansj.zip

you need a service restart after that!

Dict Configuration (es-root/config/ansj/userLibrary.dic)

Analysis Configuration (elasticsearch.yml)

index:
  analysis:                   
    analyzer:      
      ansj:
          alias: [ansj_analyzer]
          type: org.elasticsearch.index.analysis.AnsjAnalyzerProvider

Or

index.analysis.analyzer.ik.type : "ansj"
Something went wrong with that request. Please try again.