DescribeCollection()

Describes the schema and properties of a collection.

pub async fn describe_collection(&self, request: DescribeCollectionRequest) -> Result<DescribeCollectionResponse>

Request Syntax

let request = DescribeCollectionRequest::builder()
    .collection_name("books")
    .build()?;

REQUEST FIELDS:

  • database_name: Option<String>

    Name of the target database; uses the default database when empty.

  • collection_name: String

    Name of the collection to describe. Required.

RETURN TYPE:

Result

RETURNS:

A DescribeCollectionResponse containing the description of the specified collection. Returns an Error if the operation fails.

DescribeCollectionResponse
    description() // -> &CollectionDesc

METHODS:

  • description() (&CollectionDesc) -

    The collection description, including its schema, shards, partitions, aliases, consistency level, and properties. See CollectionDesc.

Example

let request = DescribeCollectionRequest::builder()
    .collection_name("books")
    .build()?;
let resp = client.describe_collection(request).await?;
println!("name: {}", resp.description().get_collection_name());

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?