🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

Milvus
Zilliz
< Docs
  • Java

getLoadState()

This operation displays whether a specified collection or partition is loaded or not.

public Boolean getLoadState(GetLoadStateReq request)

Request Syntax

getLoadState(GetLoadStateReq.builder()
    .collectionName(String collectionName)
    .partitionName(String partitionName)
    .build()
)

BUILDER METHODS:

  • collectionName(String collectionName)

    The name of a collection.

  • partitionName(String partitionName)

    The name of a partition.

RETURN TYPE:

Boolean

RETURNS:

A Boolean value that indicates the status of the specified collection or partition.

notes

A collection is in the loaded state if any or all of its partitions are loaded.

EXCEPTIONS:

  • MilvusException

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

Example

import io.milvus.v2.client.ConnectConfig;
import io.milvus.v2.client.MilvusClientV2;
import io.milvus.v2.service.collection.request.GetLoadStateReq;

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

// 2. Get load state for collection "test"
GetLoadStateReq getLoadStateReq = GetLoadStateReq.builder()
        .collectionName("test")
        .build();
Boolean resp = client.getLoadState(getLoadStateReq);

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?