Keyword analyzer
Thekeyword analyzer is a noop analyzer which returns the entire input string as a single token.
POST _analyze{ "analyzer": "keyword", "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."}
The above sentence would produce the following single term:
[ The 2 QUICK Brown-Foxes jumped over the lazy dog's bone. ]Thekeyword analyzer is not configurable.
Thekeyword analyzer consists of:
- Tokenizer
If you need to customize thekeyword analyzer then you need to recreate it as acustom analyzer and modify it, usually by adding token filters. Usually, you should prefer theKeyword type when you want strings that are not split into tokens, but just in case you need it, this would recreate the built-inkeyword analyzer and you can use it as a starting point for further customization:
PUT /keyword_example{ "settings": { "analysis": { "analyzer": { "rebuilt_keyword": { "tokenizer": "keyword", "filter": [ ] } } } }}
- You’d add any token filters here.