All Products
Search
Document Center

DashVector:Describe a collection

Last Updated:Mar 11, 2026

Retrieve the status, schema, and configuration of an existing DashVector collection by using the Java SDK.

Prerequisites

Before you begin, make sure that you have:

API definition

// DashVectorClient
public Response<CollectionMeta> describe(String name);

Request parameters

ParameterTypeRequiredDefault valueDescription
nameStringYes-The name of an existing collection.

Example

The following example retrieves details for a collection named quickstart. Create this collection beforehand by following the example in Create a collection.

Replace the following placeholders with your actual values:

PlaceholderDescription
<your-api-key>Your API key
<your-cluster-endpoint>Your cluster endpoint
import com.aliyun.dashvector.DashVectorClient;
import com.aliyun.dashvector.common.DashVectorException;
import com.aliyun.dashvector.models.CollectionMeta;
import com.aliyun.dashvector.models.responses.Response;

public class Main {
    public static void main(String[] args) throws DashVectorException {
        DashVectorClient client = new DashVectorClient("<your-api-key>", "<your-cluster-endpoint>");

        Response<CollectionMeta> response = client.describe("quickstart");

        System.out.println(response);
    }
}

Sample response:

{
    "code": 0,
    "message": "",
    "requestId": "cb468965-d86b-405a-87a4-a596e61c1240",
    "output": {
        "name": "quickstart",
        "dimension": 4,
        "dataType": "FLOAT",
        "metric": "dotproduct",
        "status": "SERVING",
        "fieldsSchema": {
            "name": "STRING",
            "weight": "FLOAT",
            "age": "INT",
            "id": "LONG"
        },
        "partitionStatus": {
            "default": "SERVING"
        }
    }
}

Response parameters

The describe method returns a Response<CollectionMeta> object. Use the following methods to access the response data:

MethodTypeDescriptionExample
getCode()intThe status code. For more information, see Status codes.0
getMessage()StringThe response message.success
getRequestIdStringThe unique request ID.19215409-ea66-4db9-8764-26ce2eb5bb99
getOutput()CollectionMetaThe collection metadata. See the following table.-
isSuccess()BooleanWhether the operation succeeded.true

The CollectionMeta object returned by getOutput() contains the following fields:

FieldTypeDescription
nameStringThe collection name.
dimensionintThe vector dimension.
dataTypeStringThe vector data type, such as FLOAT.
metricStringThe distance metric, such as dotproduct.
statusStringThe collection status. A value of SERVING indicates that the collection is ready to accept requests.
fieldsSchemaMap<String, String>The scalar field definitions. Each entry maps a field name to its data type (STRING, FLOAT, INT, or LONG).
partitionStatusMap<String, String>The status of each partition.

For the full type definition, see CollectionMeta.