| 接口 | GET /_analyze 或 GET /<index>/_analyze |
|---|---|
| 分析对象 | analyzer 名称(standard/whitespace/keyword/simple 等)或 tokenizer+filter 组合 |
| 附加参数 | explain: true 显示每一步处理细节 |
示例
示例
GET /_analyze
{ "analyzer": "standard", "text": "The QUICK brown-fox" }
GET /my-index/_analyze
{ "field": "message", "text": "Hello Elastic" }
GET /_analyze
{ "tokenizer": "standard", "filter": ["lowercase"], "text": "Hello ES" }指定 field 时会使用该字段映射里配置的 analyzer;keyword 字段分析结果通常只有原串一个 token。