[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3975":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},3975,"analysis-ik","infinilabs\u002Fanalysis-ik","infinilabs","🚌 The IK Analysis plugin integrates Lucene IK analyzer into Elasticsearch and OpenSearch, support customized dictionary.","",null,"Java",17461,3280,570,3,0,1,5,20,45,"Apache License 2.0",false,"master",[25,26,27,28,29,30],"analyzer","easysearch","elasticsearch","ik-analysis","java","opensearch","2026-06-12 02:00:56","IK Analysis for Elasticsearch and OpenSearch\n==================================\n\n![](.\u002Fassets\u002Fbanner.png)\n[![Test](https:\u002F\u002Fgithub.com\u002Finfinilabs\u002Fanalysis-ik\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Finfinilabs\u002Fanalysis-ik\u002Factions\u002Fworkflows\u002Ftest.yml)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-blue.svg)](LICENSE.txt)\n\nThe IK Analysis plugin integrates Lucene IK analyzer, and support customized dictionary.  It supports major versions of Elasticsearch and OpenSearch. Maintained and supported with ❤️ by [INFINI Labs](https:\u002F\u002Finfinilabs.com).\n\nThe plugin comprises analyzer: `ik_smart` , `ik_max_word`, and tokenizer: `ik_smart` , `ik_max_word`\n\n# How to Install\n\n### 🚀 **Get the Packaged Plugins**\n\nYou can download the packaged plugins from here:  \n\n**[https:\u002F\u002Frelease.infinilabs.com\u002F](https:\u002F\u002Frelease.infinilabs.com\u002F)**\n\n---\n\n### 🛠️ **Install via CLI**\n\nAlternatively, you can use the `plugin` CLI to install the plugin. Here's how:\n\n#### For Elasticsearch:\n```bash\nbin\u002Felasticsearch-plugin install https:\u002F\u002Fget.infini.cloud\u002Felasticsearch\u002Fanalysis-ik\u002F9.1.4\n```\n\n#### For OpenSearch:\n```bash\nbin\u002Fopensearch-plugin install https:\u002F\u002Fget.infini.cloud\u002Fopensearch\u002Fanalysis-ik\u002F2.12.0\n```\n\n---\n\n### ⚠️ **Tip**  \nMake sure to replace the version number with the one that matches your Elasticsearch or OpenSearch version.\n\n# Getting Started\n\n1.create a index\n\n```bash\ncurl -XPUT http:\u002F\u002Flocalhost:9200\u002Findex\n```\n\n2.create a mapping\n\n```bash\ncurl -XPOST http:\u002F\u002Flocalhost:9200\u002Findex\u002F_mapping -H 'Content-Type:application\u002Fjson' -d'\n{\n        \"properties\": {\n            \"content\": {\n                \"type\": \"text\",\n                \"analyzer\": \"ik_max_word\",\n                \"search_analyzer\": \"ik_smart\"\n            }\n        }\n\n}'\n```\n\n3.index some docs\n\n```bash\ncurl -XPOST http:\u002F\u002Flocalhost:9200\u002Findex\u002F_create\u002F1 -H 'Content-Type:application\u002Fjson' -d'\n{\"content\":\"美国留给伊拉克的是个烂摊子吗\"}\n'\n```\n\n```bash\ncurl -XPOST http:\u002F\u002Flocalhost:9200\u002Findex\u002F_create\u002F2 -H 'Content-Type:application\u002Fjson' -d'\n{\"content\":\"公安部：各地校车将享最高路权\"}\n'\n```\n\n```bash\ncurl -XPOST http:\u002F\u002Flocalhost:9200\u002Findex\u002F_create\u002F3 -H 'Content-Type:application\u002Fjson' -d'\n{\"content\":\"中韩渔警冲突调查：韩警平均每天扣1艘中国渔船\"}\n'\n```\n\n```bash\ncurl -XPOST http:\u002F\u002Flocalhost:9200\u002Findex\u002F_create\u002F4 -H 'Content-Type:application\u002Fjson' -d'\n{\"content\":\"中国驻洛杉矶领事馆遭亚裔男子枪击 嫌犯已自首\"}\n'\n```\n\n4.query with highlighting\n\n```bash\ncurl -XPOST http:\u002F\u002Flocalhost:9200\u002Findex\u002F_search  -H 'Content-Type:application\u002Fjson' -d'\n{\n    \"query\" : { \"match\" : { \"content\" : \"中国\" }},\n    \"highlight\" : {\n        \"pre_tags\" : [\"\u003Ctag1>\", \"\u003Ctag2>\"],\n        \"post_tags\" : [\"\u003C\u002Ftag1>\", \"\u003C\u002Ftag2>\"],\n        \"fields\" : {\n            \"content\" : {}\n        }\n    }\n}\n'\n```\n\nResult\n\n```json\n{\n    \"took\": 14,\n    \"timed_out\": false,\n    \"_shards\": {\n        \"total\": 5,\n        \"successful\": 5,\n        \"failed\": 0\n    },\n    \"hits\": {\n        \"total\": 2,\n        \"max_score\": 2,\n        \"hits\": [\n            {\n                \"_index\": \"index\",\n                \"_type\": \"fulltext\",\n                \"_id\": \"4\",\n                \"_score\": 2,\n                \"_source\": {\n                    \"content\": \"中国驻洛杉矶领事馆遭亚裔男子枪击 嫌犯已自首\"\n                },\n                \"highlight\": {\n                    \"content\": [\n                        \"\u003Ctag1>中国\u003C\u002Ftag1>驻洛杉矶领事馆遭亚裔男子枪击 嫌犯已自首 \"\n                    ]\n                }\n            },\n            {\n                \"_index\": \"index\",\n                \"_type\": \"fulltext\",\n                \"_id\": \"3\",\n                \"_score\": 2,\n                \"_source\": {\n                    \"content\": \"中韩渔警冲突调查：韩警平均每天扣1艘中国渔船\"\n                },\n                \"highlight\": {\n                    \"content\": [\n                        \"均每天扣1艘\u003Ctag1>中国\u003C\u002Ftag1>渔船 \"\n                    ]\n                }\n            }\n        ]\n    }\n}\n```\n\n# Dictionary Configuration\n\nConfig file `IKAnalyzer.cfg.xml` can be located at `{conf}\u002Fanalysis-ik\u002FIKAnalyzer.cfg.xml`\nor `{plugins}\u002Felasticsearch-analysis-ik-*\u002Fconfig\u002FIKAnalyzer.cfg.xml`\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003C!DOCTYPE properties SYSTEM \"http:\u002F\u002Fjava.sun.com\u002Fdtd\u002Fproperties.dtd\">\n\u003Cproperties>\n\t\u003Centry key=\"ext_dict\">custom\u002Fmydict.dic;custom\u002Fsingle_word_low_freq.dic\u003C\u002Fentry>\n\t\u003Centry key=\"ext_stopwords\">custom\u002Fext_stopword.dic\u003C\u002Fentry>\n\t\u003Centry key=\"remote_ext_dict\">location\u003C\u002Fentry>\n\t\u003Centry key=\"remote_ext_stopwords\">http:\u002F\u002Fxxx.com\u002Fxxx.dic\u003C\u002Fentry>\n\u003C\u002Fproperties>\n```\n\n## Hot-reload Dictionary\n\nThe current plugin supports hot reloading dictionary for IK Analysis, through the configuration mentioned earlier in the IK configuration file.\n\n```xml\n\t\u003Centry key=\"remote_ext_dict\">location\u003C\u002Fentry>\n\t\u003Centry key=\"remote_ext_stopwords\">location\u003C\u002Fentry>\n```\n\nAmong which `location` refers to a URL, such as `http:\u002F\u002Fyoursite.com\u002FgetCustomDict`. This request only needs to meet the following two points to complete the segmentation hot update.\n\n1. The HTTP request needs to return two headers, one is `Last-Modified`, and the other is `ETag`. Both of these are of string type, and if either changes, the plugin will fetch new segmentation to update the word library.\n\n2. The content format returned by the HTTP request is one word per line, and the newline character is represented by `\\n`.\n\nMeeting the above two requirements can achieve hot word updates without the need to restart the ES instance.\n\nYou can place the hot words that need to be automatically updated in a .txt file encoded in UTF-8. Place it under nginx or another simple HTTP server. When the .txt file is modified, the HTTP server will automatically return the corresponding Last-Modified and ETag when the client requests the file. You can also create a separate tool to extract relevant vocabulary from the business system and update this .txt file.\n\n## FAQs\n-------\n\n1. Why isn't the custom dictionary taking effect?\n\nPlease ensure that the text format of your custom dictionary is UTF8 encoded.\n\n2. What is the difference between ik_max_word and ik_smart?\n\nik_max_word: Performs the finest-grained segmentation of the text. For example, it will segment \"中华人民共和国国歌\" into \"中华人民共和国,中华人民,中华,华人,人民共和国,人民,人,民,共和国,共和,和,国国,国歌\", exhaustively generating various possible combinations, suitable for Term Query.\n\nik_smart: Performs the coarsest-grained segmentation of the text. For example, it will segment \"中华人民共和国国歌\" into \"中华人民共和国,国歌\", suitable for Phrase queries.\n\nNote: ik_smart is not a subset of ik_max_word.\n\n# Community\n\nFell free to join the Discord server to discuss anything around this project: \n\n[https:\u002F\u002Fdiscord.gg\u002F4tKTMkkvVX](https:\u002F\u002Fdiscord.gg\u002F4tKTMkkvVX)\n\n# License\n\nCopyright ©️ INFINI Labs.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","IK Analysis 是一个将 Lucene IK 分词器集成到 Elasticsearch 和 OpenSearch 中的插件，支持自定义词典。该插件提供了 `ik_smart` 和 `ik_max_word` 两种分析器及相应的分词器，能够更精准地处理中文文本数据。其主要技术特点包括对最新版本的 Elasticsearch 和 OpenSearch 的兼容性、易于安装和配置，以及通过自定义词典来优化分词效果。适用于需要在搜索应用中实现高质量中文分词的场景，如企业级搜索平台、内容管理系统等。",2,"2026-06-11 02:57:32","top_language"]