💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# Limit Token Count Token Filter(限制词元数量过滤器) 原文链接 :[https://www.elastic.co/guide/en/elasticsearch/reference/5.4/analysis-limit-token-count-tokenfilter.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/analysis-limit-token-count-tokenfilter.html) 译文链接 : [http://www.apache.wiki/pages/viewpage.action?pageId=10028038](http://www.apache.wiki/pages/viewpage.action?pageId=10028038) 贡献者 : [李亚运](/display/~liyayun),[ApacheCN](/display/~apachecn),[Apache中文网](/display/~apachechina) ## 简述 限制每个文档和字段索引的token数。 ## 参数 | 设置 | 描述 | | --- | --- | | `max_token_count` | 每个文档和字段应该索引的token的最大数量。 默认值为`1` | | `consume_all_tokens` | 如果设置为true,尽管已经超过max_token_count设定的值,也会最大限度的处理所有的token。默认为false。 | ## 示例 如下所示: ``` index : analysis : analyzer : myAnalyzer : type : custom tokenizer : standard filter : [lowercase, five_token_limit] filter : five_token_limit : type : limit max_token_count : 5 ```