ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# Stemmer Override Token Filter(Stemmer Override 词元过滤器) 原文链接 : [https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-stemmer-override-tokenfilter.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-stemmer-override-tokenfilter.html) 译文链接 : [http://www.apache.wiki/pages/viewpage.action?pageId=10028530](http://www.apache.wiki/pages/viewpage.action?pageId=10028530) 贡献者 : [fucker](/display/~caizhongjie),[ApacheCN](/display/~apachecn),[Apache中文网](/display/~apachechina) ``` 通过应用自定义映射来覆盖词干算法,然后保护这些术语不被词干修改。 必须放置在任何词干过滤器之前。 ``` 规则通过 **=>** 分隔开 | 设置 | 描述 | | --- | --- | | `rules` | 映射规则列表. | | `rules_path` | 映射列表文件的路径 (**`config` **`目录的相对路径或者绝对路径`) to a list of mappings. | 示例: ``` index : analysis : analyzer : myAnalyzer : type : custom tokenizer : standard filter : [lowercase, custom_stems, porter_stem] filter: custom_stems: type: stemmer_override rules_path : analysis/custom_stems.txt ```