# Run text analyzer

Tokenize text using an analyzer configuration or an analyzer-enabled collection field.

SDK: `@zilliz/milvus2-sdk-node@3.0.10` · Tested with Milvus 3.0.6

Canonical documentation: https://milvus-io.github.io/milvus-sdk-node/rest-api/text-analysis/common/run-analyzer/

## Section links

- [cURL command](https://milvus-io.github.io/milvus-sdk-node/rest-api/text-analysis/common/run-analyzer/#curl-command)
- [Default request](https://milvus-io.github.io/milvus-sdk-node/rest-api/text-analysis/common/run-analyzer/#default-request)
- [Sample response](https://milvus-io.github.io/milvus-sdk-node/rest-api/text-analysis/common/run-analyzer/#sample-response)
- [Request fields](https://milvus-io.github.io/milvus-sdk-node/rest-api/text-analysis/common/run-analyzer/#request-fields)

`POST /v2/vectordb/common/run_analyzer`

Replace `https://your-cluster.example.com` with your Milvus endpoint. Set `MILVUS_TOKEN` for authentication or omit the Authorization header on an unauthenticated cluster.

## cURL command

```bash
curl --request POST --url 'https://your-cluster.example.com/v2/vectordb/common/run_analyzer' \
  --header 'Content-Type: application/json' \
  --header "Authorization: Bearer ${MILVUS_TOKEN}" \
  --data-raw '{
  "dbName": "default",
  "text": [
    "Vector search with Milvus"
  ],
  "analyzerParams": "{\"tokenizer\":\"standard\"}"
}'
```

## Default request

```json
{
  "dbName": "default",
  "text": [
    "Vector search with Milvus"
  ],
  "analyzerParams": "{\"tokenizer\":\"standard\"}"
}
```

## Sample response

```json
{
  "code": 0,
  "data": {
    "results": [
      {
        "tokens": [
          {
            "token": "Vector"
          },
          {
            "token": "search"
          },
          {
            "token": "with"
          },
          {
            "token": "Milvus"
          }
        ]
      }
    ]
  }
}
```

## Request fields

- `dbName` string
  Database name. Operations on collections use default when omitted.
- `analyzerParams` string
  Analyzer configuration encoded as a JSON string.
- `text` array of string (required)
  Input strings to tokenize.
- `withDetail` boolean
  Include detailed token information.
- `withHash` boolean
  Include token hash values.
- `collectionName` string
  Name of the collection.
- `fieldName` string
  Name of the target field.
- `analyzerNames` array of string
  Names of the analyzers to apply.

See [`HttpClient.runAnalyzer`](https://milvus-io.github.io/milvus-sdk-node/api-reference/http-client/#runanalyzer) for the Node.js SDK method.
