The analyze API lets you inspect how Elasticsearch processes text before indexing. Use it to choose an analyzer, explain unexpected search results, and test analysis before production. section 7.2.4
Inspecting “James Bond 007”
GET _analyze { "text": "James Bond 007" } With no analyzer specified, Elasticsearch uses the standard analyzer. The response produces the lowercase tokens “james”, “bond”, and “007”, along with token types and positions. section 7.2.4
Specify an analyzer to compare alternatives. The simple analyzer returns “james” and “bond” because “007” is truncated at a non-letter character; the english analyzer returns “jame”, “bond”, and “007” through stemming. section 7.2.4
Testing a custom analyzer
GET _analyze { "tokenizer": "path_hierarchy", "filter": ["uppercase"], "text": "/Volumes/FILES/Dev" } The request can provide its tokenizer and token filters directly, making it useful for experimenting with custom analysis modules. section 4.5.1
