アナライザーの実行 (V2)
This operation runs an analyzer on the provided text and returns the tokenization result.
POST/v2/vectordb/common/run_analyzer
https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530
📘ノート
- サービングクラスターを使用している場合は、クラスターエンドポイントを使用してください。
Free & Serverless
https://{cluster-id}.serverless.{region}.vectordb.zillizcloud.comDedicated
https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530
${CLUSTER_ENDPOINT}を、あなたのZilliz Cloudクラスターのエンドポイントに置き換える必要があります。- エンドポイントを取得するには、Describe Cluster V2 APIを使用してレスポンスから値を抽出してください。
shell
export CLUSTER_ENDPOINT="https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530"
パラメータ
Authorizationstringheader必要
認証トークンは、適切な権限を持つAPIキー、またはコロンで連結したユーザー名とパスワードのペア(例: username:password)である必要があります。プロジェクトエンドポイントを使用する場合は、十分な権限を持つ有効なAPIキーのみが適用されます。
値の例: Bearer {{TOKEN}}
リクエスト・ボディapplication/json
dbNamestring
データベースの名前。
textarray必要
分析するテキスト文字列のリスト。
[]textstring
(近日追加予定)
analyzerParamsstring
JSON文字列としてのアナライザーパラメーター。
withDetailboolean
詳細なトークン情報を返すかどうか。
withHashboolean
結果にハッシュ値を含めるかどうか。
collectionNamestring
使用するフィールドアナライザーを持つコレクションの名前。
fieldNamestring
使用するアナライザーを持つフィールドの名前。
analyzerNamesarray
使用するアナライザー名のリスト。
[]analyzerNamesstring
(近日追加予定)
bash
export TOKEN="db_admin:xxxxxxxxxxxxx"
curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/common/run_analyzer" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"text": [
"Hello world"
],
"analyzerParams": "{\"type\": \"standard\"}",
"withDetail": false
}'
レスポンス200 OK - application/json
なし
codeinteger
(近日追加予定)
dataarray
[]dataobject
tokensarray
[]tokensstring
(近日追加予定)
エラーメッセージを返します。
codeinteger
レスポンスコード。
messagestring
エラーメッセージ。
Successjson
{
"code": 0,
"data": [
{
"tokens": [
"hello",
"world"
]
}
]
}