# Standard Analyzer（标准分析器）

standard(标准)分析器是默认分析器，如果没有指定分析器，则使用该分析器。它提供基于语法的标记（基于Unicode文本分段算法，如Unicode标准附件29中所述），并且用于大多数语言。

## **定义**

它包括：

Tokenizer(分词器)

* Standard Tokenizer (标准分词器)

Token Filters(词语过滤器)

* Standard Token Filter 标准词语过滤器
* Lower Case Token Filter 小写词语过滤器
* Stop Token Filter 停止词过滤器（默认情况下禁用）&#x20;

## **输出示例**

```
POST _analyze
{
  "analyzer": "standard",
  "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
}
```

上述的句子将产生以下的词语：

```
[ the, 2, quick, brown, foxes, jumped, over, the, lazy, dog's, bone ]
```

## **配置**

standard（标准）分析器接受以下的参数：

| `max_token_length` | 最大词语长度。如果看到超过此长度的词语，则以max\_token\_length分割。默认为255。 |
| ------------------ | -------------------------------------------------- |
| `stopwords`        | 预定义的停止词列表，如\_english或包含停止词列表的数组。默认为\_none\_。       |
| `stopwords_path`   | 包含停止词的文件路径。                                        |

有关停止词配置的更多信息，请参阅Stop Token Filter(停止词过滤器)。

## **配置示例**

在这个示例中，我们将standard(标准)分析器的max\_token\_length值配置为5（用于演示目的），并使用预定义的英文停止词列表：

```
PUT my_index
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_english_analyzer": {
          "type": "standard",
          "max_token_length": 5,
          "stopwords": "_english_"
        }
      }
    }
  }
}

POST my_index/_analyze
{
  "analyzer": "my_english_analyzer",
  "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
}
```

以上示例产生以下词语：

```
[ 2, quick, brown, foxes, jumpe, d, over, lazy, dog's, bone ]
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xiaoxiami.gitbook.io/elasticsearch/ji-chu/33-analysisfen-679029/333analyzersfen-xi-566829/standard-analyzerff08-biao-zhun-fen-xi-qi-ff09.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
