🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# Stop Analyzer Stop Analyzer(停止分词器)是一样的[`simple`分析](http://www.apache.wiki/pages/viewpage.action?pageId=10027574&src=contextnavpagetreemode) ,但增加了对移除停止字的支持。它默认使用`_english_`停止词。 ## **输出示例** | `POST _analyze` `{` `"analyzer"``: ``"stop"``,` `"text"``: ``"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."` `}` | 上述示例产生以下术语: | `[ quick, brown, foxes, jumped, over, lazy, dog, s, bone ]` | ## 配置 停止分词器接受以下参数: | | | | --- | --- | | stopwords | 预定义的停止词列表,如_english_或包含停止词列表的数组。 默认为_english_。 | | stopwords_path | 包含停止词的文件的路径。此路径是相对于Elasticsearch `config`目录。 | 有关停止字配置的更多信息,请参阅[Stop Token Filter](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/analysis-stop-tokenfilter.html "停止令牌过滤器")。 ## 配置示例 在本例中,我们将`stop`分析器配置为使用指定的单词列表作为停止词: | `PUT my_index` `{` `"settings"``: {` `"analysis"``: {` `"analyzer"``: {` `"my_stop_analyzer"``: {` `"type"``: ``"stop"``,` `"stopwords"``: [``"the"``, ``"over"``]` `}` `}` `}` `}` `}` `POST my_index/_analyze` `{` `"analyzer"``: ``"my_stop_analyzer"``,` `"text"``: ``"The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."` `}` | 上述示例产生以下术语: | `[ quick, brown, foxes, jumped, lazy, dog, s, bone ]` |