フィールドプロパティの変更 (V2)
この操作は、collection 内のフィールドのプロパティを変更します。
POST/v2/vectordb/collections/fields/alter_properties
https://${CLUSTER_ENDPOINT}
📘ノート
${CLUSTER_ENDPOINT}を、あなたのZilliz Cloudクラスターのエンドポイントに置き換える必要があります。- エンドポイントを取得するには、Describe Cluster V2 APIを使用してレスポンスから値を抽出してください。
shell
export CLUSTER_ENDPOINT=""
パラメータ
Authorizationstringheader必要
認証トークンは、適切な権限を持つ API key または username:password のようにコロンで連結した username と password の組み合わせである必要があります。project endpoint を使用している場合は、十分な権限を持つ有効な API key のみ使用できます。
値の例: Bearer {{TOKEN}}
リクエスト・ボディapplication/json
dbNamestring
collection が属する database の名前です。存在しない database を指定するとエラーになります。指定しない場合は、default database が適用されます。
collectionNamestring必要
対象の collection の名前です。 存在しない collection を指定するとエラーになります。
fieldNamestring必要
プロパティを変更するフィールドの名前です。
fieldParamsobject
変更するフィールドのプロパティです。
max_lengthinteger
フィールドの最大長です。これを 0 以外の値に設定すると、フィールドの最大長は指定した値に制限されます。
このパラメータは、フィールドの型が VarChar の場合にのみ適用されます。
max_capacityinteger
フィールドの最大容量です。これを 0 以外の値に設定すると、フィールドの最大容量は指定した値に制限されます。
このパラメータは、フィールドの型が Array の場合にのみ適用されます。
mmap_enabledboolean
このフィールドで memory-mapped file を有効にするかどうかです。
このパラメータは、フィールドの型が Vector の場合にのみ適用されます。
bash
export TOKEN="db_admin:xxxxxxxxxxxxx"
curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/fields/alter_properties" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"collectionName": "test_collection",
"fieldName": "my_varchar",
"fieldParams": {
"max_length": 100
}
}'
レスポンス200 OK - application/json
空のオブジェクトを返します。
codeinteger
レスポンスコード。
dataobject
エラーメッセージを返します。
codeinteger
レスポンスコード。
messagestring
エラーメッセージ。
Successjson
{
"code": 0,
"data": {}
}