﻿---
title: stack es indices analyze cli command
description: Get tokens from text analysis. 
url: https://docs-v3-preview.elastic.dev/elastic/cli/pull/406/cli/stack/es/indices/analyze
---

# stack es indices analyze cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack es indices analyze [options]
```

Get tokens from text analysis.

## Options

<definitions>
  <definition term="--index string">
    Index used to derive the analyzer. If specified, the `analyzer` or field parameter overrides this value. If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.
  </definition>
  <definition term="--analyzer string">
    The name of the analyzer that should be applied to the provided `text`. This could be a built-in analyzer, or an analyzer that’s been configured in the index.
  </definition>
  <definition term="--attributes string[]">
    Array of token attributes used to filter the output of the `explain` parameter.
  </definition>
  <definition term="--char-filter string[]">
    Array of character filters used to preprocess characters before the tokenizer.
  </definition>
  <definition term="--[no-]explain">
    If `true`, the response includes token attributes and additional details.
  </definition>
  <definition term="--field string">
    Field used to derive the analyzer. To use this parameter, you must specify an index. If specified, the `analyzer` parameter overrides this value.
  </definition>
  <definition term="--filter string[]">
    Array of token filters used to apply after the tokenizer.
  </definition>
  <definition term="--normalizer string">
    Normalizer to use to convert text into a single token.
  </definition>
  <definition term="--text string">
    Text to analyze. If an array of strings is provided, it is analyzed as a multi-value field.
    **Repeatable:** pass `--text` multiple times to supply more than one value
  </definition>
  <definition term="--tokenizer string">
    Tokenizer to use to convert text into tokens.
  </definition>
</definitions>


## stack Options

<definitions>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="-V --[no-]version">
    Print the Elastic CLI version
  </definition>
  <definition term="--config-file string">
    path to a config file (default: ~/.elasticrc.yml)
  </definition>
  <definition term="--use-context string">
    override the active context from the config file
  </definition>
  <definition term="--command-profile string">
    restrict available commands to a deployment profile (serverless, stack, default)
  </definition>
  <definition term="--[no-]json">
    output as JSON
  </definition>
  <definition term="--output-fields string">
    comma-separated list of fields to include in output (dot-notation supported)
  </definition>
  <definition term="--output-template string">
    Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
  </definition>
  <definition term="--[no-]dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>