refreshLoad()
This operation is mainly used when new segments are generated by bulkImport request, forcing the new segments to be loaded into memory.
public Void refreshLoad(RefreshLoadReq request)
Request Syntax
refreshLoad(RefreshLoadReq.builder()
.collectionName(String collectionName)
.async(Boolean async)
.timeout(Long timeout)
.build()
)
BUILDER METHODS:
collectionName(String collectionName)
The name of a collection.
async(Boolean async)
Whether this operation is asynchronous.
The value defaults to
Boolean.True
, indicating immediate return while the process may still run in the background.timeout(Long timeout)
The timeout duration of the process. The process terminates after the specified duration expires.
The value defaults to
60000L
, indicating the timeout duration is one minute.
RETURNS:
void
EXCEPTIONS:
MilvusClientExceptions
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.RefreshLoadReq;
// 1. Set up a client
ConnectConfig connectConfig = ConnectConfig.builder()
.uri("http://localhost:19530")
.token("root:Milvus")
.build();
MilvusClientV2 client = new MilvusClientV2(connectConfig);
// 2. Refresh the load status of the collection `test`
RefreshLoadReq refreshLoadReq = RefreshLoadReq.builder()
.collectionName("test")
.build();
client.refreshLoad(refreshLoadReq);