跳到主要内容
版本:v3.0.x

describeIndex()

This operation describes a specific index.

Java
public DescribeIndexResp describeIndex(DescribeIndexReq request)

Request Syntax

Java
describeIndex(DescribeIndexReq.builder()
.databaseName(String databaseName)
.collectionName(String collectionName)
.fieldName(String fieldName)
.indexName(String indexName)
.timestamp(Long timestamp)
.build()
);

BUILDER METHODS:

  • databaseName(String databaseName) -

    The name of the database. Defaults to the current database if not specified.

  • collectionName(String collectionName) -

    The name of the target collection.

  • fieldName(String fieldName) -

    The name of the target field.

  • indexName(String indexName) -

    The name of the target index.

  • timestamp(Long timestamp) -

    A timestamp for time-travel queries. Defaults to 0L.

RETURNS:

DescribeIndexResp

A DescribeIndexResp object that contains the details of the specified index.

EXCEPTIONS:

  • MilvusClientException

    This exception will be raised when any error occurs during this operation.

Example

Java
import io.milvus.v2.client.ConnectConfig;
import io.milvus.v2.client.MilvusClientV2;
import io.milvus.v2.service.index.request.DescribeIndexReq;
import io.milvus.v2.service.index.response.DescribeIndexResp;

// 1. Set up a client
ConnectConfig connectConfig = ConnectConfig.builder()
.uri("http://localhost:19530")
.token("root:Milvus")
.build();

MilvusClientV2 client = new MilvusClientV2(connectConfig);

// 2. Describe the index for the field "vector"
DescribeIndexReq describeIndexReq = DescribeIndexReq.builder()
.collectionName("test")
.fieldName("vector")
.build();
DescribeIndexResp describeIndexResp = client.describeIndex(describeIndexReq);