Simple analyzer

The simple analyzer breaks text into tokens at any non-letter character, such as numbers, spaces, hyphens and apostrophes, discards non-letter characters, and changes uppercase to lowercase.

Example

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

The simple analyzer parses the sentence and produces the following tokens:

  1. [ the, quick, brown, foxes, jumped, over, the, lazy, dog, s, bone ]

Definition

The simple analyzer is defined by one tokenizer:

Tokenizer

Customize

To customize the simple analyzer, duplicate it to create the basis for a custom analyzer. This custom analyzer can be modified as required, usually by adding token filters.

  1. PUT /my-index-000001
  2. {
  3. "settings": {
  4. "analysis": {
  5. "analyzer": {
  6. "my_custom_simple_analyzer": {
  7. "tokenizer": "lowercase",
  8. "filter": [
  9. ]
  10. }
  11. }
  12. }
  13. }
  14. }

Add token filters here.