ModifyCollection
Updates a vector collection.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
gpdb:ModifyCollection |
update |
*Collection
|
None | None |
Request syntax
GET HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
No |
The instance ID. Note
You can call the DescribeDBInstances operation to query details for all AnalyticDB for PostgreSQL instances in a region, including their instance IDs. |
gp-xxxxxxxxx |
| NamespacePassword |
string |
Yes |
The password for the namespace. |
testpassword |
| Namespace |
string |
No |
The namespace. The default value is Note
You can call the CreateNamespace operation to create a namespace and the ListNamespaces operation to list existing namespaces. |
mynamespace |
| Collection |
string |
Yes |
The collection name. Note
You can call the ListCollections operation to list all collections. |
document |
| Metadata |
string |
Yes |
A JSON string that specifies the operations to add or modify metadata fields. For the required format, see the example. Use this parameter to add new metadata fields, rename existing metadata fields, or perform implicit data type conversion on existing fields. Details: To add a new metadata field, set To modify an existing metadata field, set Note
Warning The field names id, vector, to_tsvector, and source are reserved. |
{"operations":[ {"operator":"add","newMetaType":"int","newMetaName":"ext1","fullTextRetrieval":true}, {"operator":"replace","oldMetaName":"ext2","newMetaName":"ext3"}, {"operator":"replace","newMetaType":"bigint","oldMetaName":"ext4"}, {"operator":"replace","newMetaType":"int","oldMetaName":"ext5","newMetaName":"ext6"} ]} |
| RegionId |
string |
Yes |
The region ID of the instance. |
cn-hangzhou |
| WorkspaceId |
string |
No |
The ID of the workspace that contains multiple database instances. You must specify either this parameter or |
gp-ws-***** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| Message |
string |
The response message. |
Successful |
| Metadata |
string |
The metadata schema of the collection, returned as a JSON string. This string represents a map where keys are field names and values are their data types. Note
|
{"title":"text","content":"text","response":"int"} |
| RequestId |
string |
The request ID. |
ABB39CC3-4488-4857-905D-2E4A051D0521 |
| Status |
string |
The status of the API request. Valid values:
|
success |
Examples
Success response
JSON format
{
"Message": "Successful",
"Metadata": "{\"title\":\"text\",\"content\":\"text\",\"response\":\"int\"}",
"RequestId": "ABB39CC3-4488-4857-905D-2E4A051D0521",
"Status": "success"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.