milvus-logo
LFAI
< Docs
  • Java

R

A template class to hold the status code, error message, and the response returned by each client interface.

package io.milvus.param;
public class R<T>

R.Status

R.Status is an enumeration of the status codes. Each R<T> object holds an integer value that can be mapped to the R.Status.

Not all status codes are used, some of them are reserved.
StatusCodeDescription
IllegalResponse-6The response returned by the server is incorrect. Parsing the response on the client side fails.
ParamError-5The parameter is illegal on the client side.
VersionMismatch-4*This error is reserved and not used for now.
Unknown-3General error for an unknown reason.
ClientNotConnected-2The connection is not ready.
RpcError-1*This error is reserved and not used for now.
Success0Operation succeeded.
UnexpectedError1Error caused by unexpected reason.
ConnectFailed2*This error is reserved and not used for now.
PermissionDenied3*This error is reserved and not used for now.
CollectionNotExists4*This error is reserved and not used for now.
IllegalArgument5The parameter is illegal on the server side.
IllegalDimension7*This error is reserved and not used for now.
IllegalIndexType8*This error is reserved and not used for now.
IllegalCollectionName9*This error is reserved and not used for now.
IllegalTOPK10*This error is reserved and not used for now.
IllegalRowRecord11*This error is reserved and not used for now.
IllegalVectorID12*This error is reserved and not used for now.
IllegalSearchResult13*This error is reserved and not used for now.
FileNotFound14*This error is reserved and not used for now.
MetaFailed15Getting metadata fails on the server side.
CacheFailed16*This error is reserved and not used for now.
CannotCreateFolder17*This error is reserved and not used for now.
CannotCreateFile18*This error is reserved and not used for now.
CannotDeleteFolder19*This error is reserved and not used for now.
CannotDeleteFile20*This error is reserved and not used for now.
BuildIndexError21*This error is reserved and not used for now.
IllegalNLIST22*This error is reserved and not used for now.
IllegalMetricType23*This error is reserved and not used for now.
OutOfMemory24*This error is reserved and not used for now.
IndexNotExist25*This error is reserved and not used for now.
EmptyCollection26*This error is reserved and not used for now.

Methods

MethodDescriptionReturn
getMessage()Gets the error message.String
getStatus()Gets the status code.Integer
getData()Gets the response object returned by the server.RPC response class

Example

import io.milvus.param.*;

R<RpcStatus> response = client.dropCollection(DropCollectionParam.newBuilder()
        .withCollectionName(collectionName)
        .build());
if (response.getStatus() != R.Status.Success.getCode()) {
    System.out.println(response.getMessage());
}