Skip to content
MilvusNode SDK
Sections

Run text analyzer

Markdown

Copy for agent

Connection and CORS help

Use HTTPS for remote clusters or HTTP on loopback. Requests go directly from your browser to the endpoint. Run List collections to populate the collection selector. When copying an authenticated cURL command, set MILVUS_TOKEN in your shell.

For cross-origin requests, configure the endpoint to answer OPTIONS and allow the docs origin, POST, Content-Type, and Authorization if you use a token. Try the copied cURL command to troubleshoot outside the browser.

POST/v2/vectordb/common/run_analyzer

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

Example response

{
  "code": 0,
  "data": {
    "results": [
      {
        "tokens": [
          {
            "token": "Vector"
          },
          {
            "token": "search"
          },
          {
            "token": "with"
          },
          {
            "token": "Milvus"
          }
        ]
      }
    ]
  }
}
cURL command
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\"}"
}'

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

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 for the Node.js SDK method.