analyze_text
Tokenize text with Elasticsearch/OpenSearch analyzers to debug search matches and understand token transformations.
Instructions
Analyze text to see how it would be tokenized.
Use this tool to understand how Elasticsearch/OpenSearch tokenizes and transforms text using analyzers. This is essential for debugging search queries and understanding why certain documents match or don't match.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to analyze | |
| index | No | Index name to use its configured analyzer. If not specified, uses cluster-level analysis with built-in analyzers only. | |
| filter | No | List of token filters to apply (e.g., ['lowercase', 'stop']). Used with 'tokenizer' for custom analysis chain. | |
| cluster | No | Optional cluster name. Uses the default cluster if omitted. | |
| explain | No | If True, returns detailed information about each token including all token attributes and filter transformations. Useful for debugging complex analyzer chains. | |
| analyzer | No | Name of the analyzer to use (e.g., 'standard', 'korean', 'korean_search'). If index is specified, you can use custom analyzers defined in that index. | |
| tokenizer | No | Tokenizer to use for custom analysis chain. Cannot be used together with 'analyzer'. | |
| attributes | No | List of token attributes to return when explain=True (e.g., ['keyword', 'type']). If not specified, all attributes are returned. | |
| char_filter | No | List of character filters to apply before tokenization. Used with 'tokenizer' for custom analysis chain. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||