Skip to main content

Keyword Analyzer

关键字分析器将整个输入字符串作为单个token返回

示例

POST _analyze
{
"analyzer": "keyword",
"text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
}

分词结果

[ The 2 QUICK Brown-Foxes jumped over the lazy dog's bone. ]

参数

关键字分析器不可配置。

定义

  • Tokenizer
    • Keyword Tokenizer

自定义示例

PUT /stop_example
PUT /keyword_example
{
"settings": {
"analysis": {
"analyzer": {
"rebuilt_keyword": {
"tokenizer": "keyword",
"filter": [ (1)
]
}
}
}
}
}
  1. 您可以在此处添加任何令牌筛选器。