Use the list-vectors command to list all vector data in an index.
Permissions
Alibaba Cloud accounts have all permissions by default. In contrast, Resource Access Management (RAM) users and RAM roles have no permissions by default. The Alibaba Cloud account or an administrator must grant permissions to them using a RAM policy or a bucket policy.
API | Action | Description |
ListVectors |
| Lists vector data. |
Command format
ossutil vectors-api list-vectors --bucket value --index-name value [flags]Parameters
Parameter | Type | Description |
--bucket | string | The name of the vector bucket. |
--index-name | string | The name of the index. |
--max-results | int | The maximum number of results to return in each response. The default value is 500.
|
--next-token | string | The query token. Set this parameter to the `nextToken` value returned in the previous command. The token can be 1 to 512 bytes in length. |
--return-data | / | Specifies whether to return vector data. If you leave this parameter empty or set it to |
--return-metadata | / | Specifies whether to return metadata. If you leave this parameter empty or set it to |
--segment-count | int | The degree of parallelism. The maximum value is 16. For serial processing, set this parameter to 1. |
--segment-index | int | The index of the segment. The value must be smaller than the value of `segment-count`. |
The get-vectors command corresponds to the GetVectors API operation.
For information about supported global command-line options, see Global command-line options.
Examples
List all vectors in the `index` index of the `examplebucket` vector bucket.
ossutil vectors-api list-vectors --bucket examplebucket --index-name indexList the first 100 vectors in the `index` index of the `examplebucket` vector bucket.
ossutil vectors-api list-vectors --bucket examplebucket --index-name index --max-results 100List vectors in the `index` index of the `examplebucket` vector bucket, starting from a specified token.
ossutil vectors-api list-vectors --bucket examplebucket --index-name index --next-token exampleList all vectors in the `index` index of the `examplebucket` vector bucket. By default, a maximum of 500 results are returned.
ossutil vectors-api list-vectors --bucket examplebucket --index-name index --return-dataList all vectors in the `index` index of the `examplebucket` vector bucket and retrieve their metadata.
ossutil vectors-api list-vectors --bucket examplebucket --index-name index --return-metadata