About this project

IK Analysis integrates the Lucene IK analyzer into Elasticsearch and OpenSearch, adding Chinese-language segmentation capabilities for indexed and searched text. The plugin exposes two analyzers and tokenizers, ik_smart and ik_max_word. ik_max_word performs fine-grained, exhaustive segmentation suitable for term queries, while ik_smart performs coarser segmentation suitable for phrase queries; the README notes that ik_smart is not necessarily a subset of ik_max_word. Installation is available through packaged releases or the Elasticsearch/OpenSearch plugin CLI, with the plugin version selected to match the target search-engine version. The README demonstrates creating an index, assigning ik_max_word as the index analyzer and ik_smart as the search analyzer, indexing Chinese documents, and running a match query with highlighting. Dictionary behavior is configured through IKAnalyzer.cfg.xml. Users can define local custom dictionaries and stopword files, or provide remote dictionary and stopword URLs. Remote dictionaries support hot reload: when the HTTP response's Last-Modified or ETag value changes, the plugin retrieves the updated UTF-8 text file, where each line contains one word. This allows vocabulary updates without restarting Elasticsearch or OpenSearch. The project is maintained by INFINI Labs and released under the Apache License 2.0.