💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
# Keyword Repeat Token Filter(Keyword Repeat 词元过滤器) **keyword_repeat** 词元过滤器将每个传入两次的词元发送一次作为关键字,一次作为非关键字,以允许将术语的未设置版本与该术语的主题版本并排编入索引。 鉴于此过滤器的性质,未被后续监听器转换的每个词元将被索引两次。 因此,考虑添加 **`unique<span style="color: rgb(68, 68, 68);"> </span>`**过滤器,**only_on_same_position** 设置为 **true** 可以丢弃不必要的重复项。 示例如下: | `index :` `analysis :` `analyzer :` `myAnalyzer :` `type : custom` `tokenizer : standard` `filter : [lowercase, keyword_repeat, porter_stem, unique_stem]` `unique_stem:` `type: unique` `only_on_same_position : ``true` |