# MilvusServiceClient

Package io.milvus.client

## Class MilvusServiceClient

- java.lang.Object
- - io.milvus.client.AbstractMilvusGrpcClient
  - - io.milvus.client.MilvusServiceClient

All Implemented Interfaces:
  `MilvusClient`

    public class MilvusServiceClient
    extends AbstractMilvusGrpcClient

### Field Summary

### Fields inherited from class io.milvus.client.AbstractMilvusGrpcClient

`logger, logLevel`

### Constructor Summary

Constructors
`` `MilvusServiceClient​(@NonNull ConnectParam connectParam)`
`protected` `MilvusServiceClient​(MilvusServiceClient src)`

### Method Summary

All Methods Instance Methods Concrete Methods
`R<RpcStatus>` `addUserToRole​(AddUserToRoleParam requestParam)` The user will get permissions that the role are allowed to perform operations.
`R<RpcStatus>` `alterAlias​(AlterAliasParam requestParam)` Alters alias from a collection to another.
`R<RpcStatus>` `alterCollection​(AlterCollectionParam requestParam)` Alter collection.
`protected io.milvus.grpc.MilvusServiceGrpc.MilvusServiceBlockingStub` `blockingStub()`
`R<io.milvus.grpc.ImportResponse>` `bulkInsert​(BulkInsertParam requestParam)` Import data from external files, currently support JSON format
`R<io.milvus.grpc.CheckHealthResponse>` `checkHealth()` Check server health
`protected boolean` `clientIsReady()`
`void` `close​(long maxWaitSeconds)` Disconnects from a Milvus server with configurable timeout.
`R<RpcStatus>` `createAlias​(CreateAliasParam requestParam)` Creates an alias for a collection.
`R<RpcStatus>` `createCollection​(CreateCollectionParam requestParam)` Creates a collection in Milvus.
`R<RpcStatus>` `createCollection​(CreateSimpleCollectionParam requestParam)` Creates a collection in Milvus.
`R<RpcStatus>` `createCredential​(CreateCredentialParam requestParam)` Create credential using the given user and password.
`R<RpcStatus>` `createDatabase​(CreateDatabaseParam requestParam)` Creates a database in Milvus.
`R<RpcStatus>` `createIndex​(CreateIndexParam requestParam)` Creates an index on a vector field in the specified collection.
`R<RpcStatus>` `createPartition​(CreatePartitionParam requestParam)` Creates a partition in the specified collection.
`R<RpcStatus>` `createRole​(CreateRoleParam requestParam)` It will success if the role isn't existed, otherwise fail.
`R<io.milvus.grpc.MutationResult>` `delete​(DeleteParam requestParam)` Deletes entity(s) based on primary key(s) filtered by boolean expression.
`R<DeleteResponse>` `delete​(DeleteIdsParam requestParam)` Deletes entity(s) based on the value of primary key.
`R<RpcStatus>` `deleteCredential​(DeleteCredentialParam requestParam)` Delete credential corresponding to the user.
`R<io.milvus.grpc.DescribeCollectionResponse>` `describeCollection​(DescribeCollectionParam requestParam)` Shows the details of a collection, e.g.
`R<io.milvus.grpc.DescribeIndexResponse>` `describeIndex​(DescribeIndexParam requestParam)` Shows the information of the specified index.
`R<RpcStatus>` `dropAlias​(DropAliasParam requestParam)` Drops an alias for the specified collection.
`R<RpcStatus>` `dropCollection​(DropCollectionParam requestParam)` Drops a collection.
`R<RpcStatus>` `dropDatabase​(DropDatabaseParam requestParam)` Drops a database.
`R<RpcStatus>` `dropIndex​(DropIndexParam requestParam)` Drops the index on a vector field in the specified collection.
`R<RpcStatus>` `dropPartition​(DropPartitionParam requestParam)` Drops a partition.
`R<RpcStatus>` `dropRole​(DropRoleParam requestParam)` It will success if the role is existed, otherwise fail.
`R<io.milvus.grpc.FlushResponse>` `flush​(FlushParam requestParam)` Flush insert buffer into storage.
`R<io.milvus.grpc.FlushAllResponse>` `flushAll​(boolean syncFlushAll, long syncFlushAllWaitingInterval, long syncFlushAllTimeout)` Flush all collections.
`protected io.milvus.grpc.MilvusServiceGrpc.MilvusServiceFutureStub` `futureStub()`
`R<GetResponse>` `get​(GetIdsParam requestParam)` Get entity(s) based on the value of primary key.
`R<io.milvus.grpc.GetImportStateResponse>` `getBulkInsertState​(GetBulkInsertStateParam requestParam)` Get state of bulk insert task
`R<io.milvus.grpc.GetCollectionStatisticsResponse>` `getCollectionStatistics​(GetCollectionStatisticsParam requestParam)` Shows the statistics information of a collection.
`R<io.milvus.grpc.GetCompactionStateResponse>` `getCompactionState​(GetCompactionStateParam requestParam)` Gets the compaction state by id.
`R<io.milvus.grpc.GetCompactionPlansResponse>` `getCompactionStateWithPlans​(GetCompactionPlansParam requestParam)` Gets compaction state with its plan.
`R<io.milvus.grpc.GetFlushAllStateResponse>` `getFlushAllState​(GetFlushAllStateParam requestParam)` Get flush state of all segments.
`R<io.milvus.grpc.GetFlushStateResponse>` `getFlushState​(GetFlushStateParam requestParam)` Get flush state of specified segments.
`R<io.milvus.grpc.GetLoadingProgressResponse>` `getLoadingProgress​(GetLoadingProgressParam requestParam)` Get collection loading progress
`R<io.milvus.grpc.GetLoadStateResponse>` `getLoadState​(GetLoadStateParam requestParam)` Get collection loading state
`R<io.milvus.grpc.GetMetricsResponse>` `getMetrics​(GetMetricsParam requestParam)` Gets the runtime metrics information of Milvus, returns the result in .json format.
`R<io.milvus.grpc.GetPartitionStatisticsResponse>` `getPartitionStatistics​(GetPartitionStatisticsParam requestParam)` Shows the statistics information of a partition.
`R<io.milvus.grpc.GetPersistentSegmentInfoResponse>` `getPersistentSegmentInfo​(GetPersistentSegmentInfoParam requestParam)` Gets the information of persistent segments from data node, including row count, persistence state(growing or flushed), etc.
`R<io.milvus.grpc.GetQuerySegmentInfoResponse>` `getQuerySegmentInfo​(GetQuerySegmentInfoParam requestParam)` Gets the query information of segments in a collection from query node, including row count, memory usage size, index name, etc.
`R<io.milvus.grpc.GetReplicasResponse>` `getReplicas​(GetReplicasParam requestParam)` Returns the collection's replica information
`R<io.milvus.grpc.GetVersionResponse>` `getVersion()` Get server version
`R<RpcStatus>` `grantRolePrivilege​(GrantRolePrivilegeParam requestParam)` Grant Role Privilege.
`R<java.lang.Boolean>` `hasCollection​(HasCollectionParam requestParam)` Checks if a collection exists.
`R<java.lang.Boolean>` `hasPartition​(HasPartitionParam requestParam)` Checks if a partition exists in the specified collection.
`R<io.milvus.grpc.MutationResult>` `insert​(InsertParam requestParam)` Inserts entities into a specified collection .
`R<InsertResponse>` `insert​(InsertRowsParam requestParam)` Inserts rows data into a specified collection .
`R<io.milvus.grpc.ListImportTasksResponse>` `listBulkInsertTasks​(ListBulkInsertTasksParam requestParam)` List bulk insert tasks
`R<ListCollectionsResponse>` `listCollections​(ListCollectionsParam requestParam)` Lists all collections
`R<io.milvus.grpc.ListCredUsersResponse>` `listCredUsers​(ListCredUsersParam requestParam)` List all user names.
`R<io.milvus.grpc.ListDatabasesResponse>` `listDatabases()` List databases.
`R<RpcStatus>` `loadBalance​(LoadBalanceParam requestParam)` Moves segment from a query node to another to keep the load balanced.
`R<RpcStatus>` `loadCollection​(LoadCollectionParam requestParam)` Loads a collection to memory before search or query.
`R<RpcStatus>` `loadPartitions​(LoadPartitionsParam requestParam)` Loads a partition into memory.
`R<io.milvus.grpc.ManualCompactionResponse>` `manualCompact​(ManualCompactParam requestParam)` Performs a manual compaction.
`R<io.milvus.grpc.QueryResults>` `query​(QueryParam requestParam)` Queries entity(s) based on scalar field(s) filtered by boolean expression.
`R<QueryResponse>` `query​(QuerySimpleParam requestParam)` Queries entity(s) based on scalar field(s) filtered by boolean expression.
`R<RpcStatus>` `releaseCollection​(ReleaseCollectionParam requestParam)` Releases a collection from memory to reduce memory usage.
`R<RpcStatus>` `releasePartitions​(ReleasePartitionsParam requestParam)` Releases a partition from memory.
`R<RpcStatus>` `removeUserFromRole​(RemoveUserFromRoleParam requestParam)` The user will remove permissions that the role are allowed to perform operations.
`R<RpcStatus>` `renameCollection​(RenameCollectionParam requestParam)` rename a collection
`R<RpcStatus>` `revokeRolePrivilege​(RevokeRolePrivilegeParam requestParam)` Revoke Role Privilege.
`R<io.milvus.grpc.SearchResults>` `search​(SearchParam requestParam)` Conducts ANN search on a vector field.
`R<SearchResponse>` `search​(SearchSimpleParam requestParam)` Conducts ANN search on a vector field.
`R<io.milvus.grpc.SelectGrantResponse>` `selectGrantForRole​(SelectGrantForRoleParam requestParam)` List a grant info for the role and the specific object
`R<io.milvus.grpc.SelectGrantResponse>` `selectGrantForRoleAndObject​(SelectGrantForRoleAndObjectParam requestParam)` List a grant info for the role
`R<io.milvus.grpc.SelectRoleResponse>` `selectRole​(SelectRoleParam requestParam)` Get all users who are added to the role.
`R<io.milvus.grpc.SelectUserResponse>` `selectUser​(SelectUserParam requestParam)` Get all roles the user has.
`void` `setLogLevel​(LogLevel level)`
`R<io.milvus.grpc.ShowCollectionsResponse>` `showCollections​(ShowCollectionsParam requestParam)` Lists all collections or gets collection loading status.
`R<io.milvus.grpc.ShowPartitionsResponse>` `showPartitions​(ShowPartitionsParam requestParam)` Shows all partitions in the specified collection.
`R<RpcStatus>` `updateCredential​(UpdateCredentialParam requestParam)` Update credential using the given user and password.
`MilvusClient` `withRetry​(int retryTimes)` Number of retry attempts.
`MilvusClient` `withRetryInterval​(long interval, java.util.concurrent.TimeUnit timeUnit)` Time interval between retry attempts.
`MilvusClient` `withTimeout​(long timeout, java.util.concurrent.TimeUnit timeoutUnit)` Timeout setting for rpc call.

### Methods inherited from class io.milvus.client.AbstractMilvusGrpcClient

`getIndexBuildProgress, getIndexState, insertAsync, logDebug, logError, logInfo, logWarning, queryAsync, searchAsync, upsert, upsertAsync`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface io.milvus.client.MilvusClient

`close`

### Constructor Detail

#### MilvusServiceClient

    public MilvusServiceClient​(@NonNull
                               @NonNull ConnectParam connectParam)

#### MilvusServiceClient

    protected MilvusServiceClient​(MilvusServiceClient src)

### Method Detail

#### setLogLevel

    public void setLogLevel​(LogLevel level)

#### blockingStub

    protected io.milvus.grpc.MilvusServiceGrpc.MilvusServiceBlockingStub blockingStub()

Specified by:
  `blockingStub` in class `AbstractMilvusGrpcClient`

#### futureStub

    protected io.milvus.grpc.MilvusServiceGrpc.MilvusServiceFutureStub futureStub()

Specified by:
  `futureStub` in class `AbstractMilvusGrpcClient`

#### clientIsReady

    protected boolean clientIsReady()

Specified by:
  `clientIsReady` in class `AbstractMilvusGrpcClient`

#### close

    public void close​(long maxWaitSeconds)
               throws java.lang.InterruptedException

Description copied from interface: `MilvusClient`
Disconnects from a Milvus server with configurable timeout.

Parameters:
  `maxWaitSeconds` - timeout unit: second
Throws:
  `java.lang.InterruptedException`

#### withTimeout

    public MilvusClient withTimeout​(long timeout,
                                    java.util.concurrent.TimeUnit timeoutUnit)

Description copied from interface: `MilvusClient`
Timeout setting for rpc call.

Parameters:
  `timeout` - set time waiting for a rpc call.
  `timeoutUnit` - time unit

#### withRetry

    public MilvusClient withRetry​(int retryTimes)

Description copied from interface: `MilvusClient`
Number of retry attempts.

Parameters:
  `retryTimes` - number of retry attempts.

#### withRetryInterval

    public MilvusClient withRetryInterval​(long interval,
                                          java.util.concurrent.TimeUnit timeUnit)

Description copied from interface: `MilvusClient`
Time interval between retry attempts. Default value is 500ms.

Parameters:
  `interval` - time interval between retry attempts.
  `timeUnit` - time unit

#### hasCollection

    public R<java.lang.Boolean> hasCollection​(HasCollectionParam requestParam)

Description copied from interface: `MilvusClient`
Checks if a collection exists.

Specified by:
  `hasCollection` in interface `MilvusClient`
Overrides:
  `hasCollection` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `HasCollectionParam`
Returns:
  {status:result code, data: boolean, whether if has collection or not}

#### createDatabase

    public R<RpcStatus> createDatabase​(CreateDatabaseParam requestParam)

Description copied from interface: `MilvusClient`
Creates a database in Milvus.

Specified by:
  `createDatabase` in interface `MilvusClient`
Overrides:
  `createDatabase` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `CreateDatabaseParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### dropDatabase

    public R<RpcStatus> dropDatabase​(DropDatabaseParam requestParam)

Description copied from interface: `MilvusClient`
Drops a database. Note that this method drops all data in the database.

Specified by:
  `dropDatabase` in interface `MilvusClient`
Overrides:
  `dropDatabase` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DropDatabaseParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### listDatabases

    public R<io.milvus.grpc.ListDatabasesResponse> listDatabases()

Description copied from interface: `MilvusClient`
List databases. Note that this method list all database in the cluster.

Specified by:
  `listDatabases` in interface `MilvusClient`
Overrides:
  `listDatabases` in class `AbstractMilvusGrpcClient`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### createCollection

    public R<RpcStatus> createCollection​(CreateCollectionParam requestParam)

Description copied from interface: `MilvusClient`
Creates a collection in Milvus.

Specified by:
  `createCollection` in interface `MilvusClient`
Overrides:
  `createCollection` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `CreateCollectionParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### dropCollection

    public R<RpcStatus> dropCollection​(DropCollectionParam requestParam)

Description copied from interface: `MilvusClient`
Drops a collection. Note that this method drops all data in the collection.

Specified by:
  `dropCollection` in interface `MilvusClient`
Overrides:
  `dropCollection` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DropCollectionParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### loadCollection

    public R<RpcStatus> loadCollection​(LoadCollectionParam requestParam)

Description copied from interface: `MilvusClient`
Loads a collection to memory before search or query.

Specified by:
  `loadCollection` in interface `MilvusClient`
Overrides:
  `loadCollection` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `LoadCollectionParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### releaseCollection

    public R<RpcStatus> releaseCollection​(ReleaseCollectionParam requestParam)

Description copied from interface: `MilvusClient`
Releases a collection from memory to reduce memory usage. Note that you cannot search while the corresponding collection is released from memory.

Specified by:
  `releaseCollection` in interface `MilvusClient`
Overrides:
  `releaseCollection` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `ReleaseCollectionParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### describeCollection

    public R<io.milvus.grpc.DescribeCollectionResponse> describeCollection​(DescribeCollectionParam requestParam)

Description copied from interface: `MilvusClient`
Shows the details of a collection, e.g. name, schema.

Specified by:
  `describeCollection` in interface `MilvusClient`
Overrides:
  `describeCollection` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DescribeCollectionParam`
Returns:
  {status:result code, data:DescribeCollectionResponse{schema,collectionID}}

#### getCollectionStatistics

    public R<io.milvus.grpc.GetCollectionStatisticsResponse> getCollectionStatistics​(GetCollectionStatisticsParam requestParam)

Description copied from interface: `MilvusClient`
Shows the statistics information of a collection.

Specified by:
  `getCollectionStatistics` in interface `MilvusClient`
Overrides:
  `getCollectionStatistics` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetCollectionStatisticsParam`
Returns:
  {status:result code, data: GetCollectionStatisticsResponse{status,stats}}

#### renameCollection

    public R<RpcStatus> renameCollection​(RenameCollectionParam requestParam)

Description copied from interface: `MilvusClient`
rename a collection

Specified by:
  `renameCollection` in interface `MilvusClient`
Overrides:
  `renameCollection` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `RenameCollectionParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### showCollections

    public R<io.milvus.grpc.ShowCollectionsResponse> showCollections​(ShowCollectionsParam requestParam)

Description copied from interface: `MilvusClient`
Lists all collections or gets collection loading status.

Specified by:
  `showCollections` in interface `MilvusClient`
Overrides:
  `showCollections` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `ShowCollectionsParam`
Returns:
  {status:result code, data: ShowCollectionsResponse{status,collection_names,collection_ids,created_timestamps,created_utc_timestamps}}

#### alterCollection

    public R<RpcStatus> alterCollection​(AlterCollectionParam requestParam)

Description copied from interface: `MilvusClient`
Alter collection. Currently, only support setting collection TTL with key `collection.ttl.seconds`

Specified by:
  `alterCollection` in interface `MilvusClient`
Overrides:
  `alterCollection` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `AlterCollectionParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### flush

    public R<io.milvus.grpc.FlushResponse> flush​(FlushParam requestParam)

Description copied from class: `AbstractMilvusGrpcClient`
Flush insert buffer into storage. To make sure the buffer persisted successfully, it calls GetFlushState() to check related segments state.

Specified by:
  `flush` in interface `MilvusClient`
Overrides:
  `flush` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `FlushParam`
Returns:
  {status:result code,data: FlushResponse{flush segment ids}}

#### flushAll

    public R<io.milvus.grpc.FlushAllResponse> flushAll​(boolean syncFlushAll,
                                                       long syncFlushAllWaitingInterval,
                                                       long syncFlushAllTimeout)

Description copied from class: `AbstractMilvusGrpcClient`
Flush all collections. All insertions, deletions, and upserts before `flushAll` will be synced.

Specified by:
  `flushAll` in interface `MilvusClient`
Overrides:
  `flushAll` in class `AbstractMilvusGrpcClient`
Parameters:
  `syncFlushAll` - {flushAll synchronously or asynchronously}
  `syncFlushAllWaitingInterval` - {wait intervel when flushAll synchronously}
  `syncFlushAllTimeout` - {timeout when flushAll synchronously}
Returns:
  {status:result code,data: FlushAllResponse{flushAllTs}}

#### createPartition

    public R<RpcStatus> createPartition​(CreatePartitionParam requestParam)

Description copied from interface: `MilvusClient`
Creates a partition in the specified collection.

Specified by:
  `createPartition` in interface `MilvusClient`
Overrides:
  `createPartition` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `CreatePartitionParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### dropPartition

    public R<RpcStatus> dropPartition​(DropPartitionParam requestParam)

Description copied from interface: `MilvusClient`
Drops a partition. Note that this method drops all data in this partition and the _default partition cannot be dropped.

Specified by:
  `dropPartition` in interface `MilvusClient`
Overrides:
  `dropPartition` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DropPartitionParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### hasPartition

    public R<java.lang.Boolean> hasPartition​(HasPartitionParam requestParam)

Description copied from interface: `MilvusClient`
Checks if a partition exists in the specified collection.

Specified by:
  `hasPartition` in interface `MilvusClient`
Overrides:
  `hasPartition` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `HasPartitionParam`
Returns:
  {status:result code, data: boolean, whether if has collection or not}

#### loadPartitions

    public R<RpcStatus> loadPartitions​(LoadPartitionsParam requestParam)

Description copied from interface: `MilvusClient`
Loads a partition into memory.

Specified by:
  `loadPartitions` in interface `MilvusClient`
Overrides:
  `loadPartitions` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `LoadPartitionsParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### releasePartitions

    public R<RpcStatus> releasePartitions​(ReleasePartitionsParam requestParam)

Description copied from interface: `MilvusClient`
Releases a partition from memory.

Specified by:
  `releasePartitions` in interface `MilvusClient`
Overrides:
  `releasePartitions` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `ReleasePartitionsParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### getPartitionStatistics

    public R<io.milvus.grpc.GetPartitionStatisticsResponse> getPartitionStatistics​(GetPartitionStatisticsParam requestParam)

Description copied from interface: `MilvusClient`
Shows the statistics information of a partition.

Specified by:
  `getPartitionStatistics` in interface `MilvusClient`
Overrides:
  `getPartitionStatistics` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetPartitionStatisticsParam`
Returns:
  {status:result code,data:GetPartitionStatisticsResponse{status,stats}}

#### showPartitions

    public R<io.milvus.grpc.ShowPartitionsResponse> showPartitions​(ShowPartitionsParam requestParam)

Description copied from interface: `MilvusClient`
Shows all partitions in the specified collection.

Specified by:
  `showPartitions` in interface `MilvusClient`
Overrides:
  `showPartitions` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `ShowPartitionsParam`
Returns:
  {status:result code, data:ShowPartitionsResponse{partition_names,partitionIDs,created_timestamps,created_utc_timestamps}}

#### createAlias

    public R<RpcStatus> createAlias​(CreateAliasParam requestParam)

Description copied from interface: `MilvusClient`
Creates an alias for a collection. Alias can be used in search or query to replace the collection name

Specified by:
  `createAlias` in interface `MilvusClient`
Overrides:
  `createAlias` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `CreateAliasParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### dropAlias

    public R<RpcStatus> dropAlias​(DropAliasParam requestParam)

Description copied from interface: `MilvusClient`
Drops an alias for the specified collection.

Specified by:
  `dropAlias` in interface `MilvusClient`
Overrides:
  `dropAlias` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DropAliasParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### alterAlias

    public R<RpcStatus> alterAlias​(AlterAliasParam requestParam)

Description copied from interface: `MilvusClient`
Alters alias from a collection to another.

Specified by:
  `alterAlias` in interface `MilvusClient`
Overrides:
  `alterAlias` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `AlterAliasParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### createIndex

    public R<RpcStatus> createIndex​(CreateIndexParam requestParam)

Description copied from interface: `MilvusClient`
Creates an index on a vector field in the specified collection. Note that index building is an async progress.

Specified by:
  `createIndex` in interface `MilvusClient`
Overrides:
  `createIndex` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `CreateIndexParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### dropIndex

    public R<RpcStatus> dropIndex​(DropIndexParam requestParam)

Description copied from interface: `MilvusClient`
Drops the index on a vector field in the specified collection.

Specified by:
  `dropIndex` in interface `MilvusClient`
Overrides:
  `dropIndex` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DropIndexParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### describeIndex

    public R<io.milvus.grpc.DescribeIndexResponse> describeIndex​(DescribeIndexParam requestParam)

Description copied from interface: `MilvusClient`
Shows the information of the specified index. Current release of Milvus only supports showing latest built index.

Specified by:
  `describeIndex` in interface `MilvusClient`
Overrides:
  `describeIndex` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DescribeIndexParam`
Returns:
  {status:result code, data:DescribeIndexResponse{status,index_descriptions}}

#### insert

    public R<io.milvus.grpc.MutationResult> insert​(InsertParam requestParam)

Description copied from interface: `MilvusClient`
Inserts entities into a specified collection . Note that you don't need to input primary key field if auto_id is enabled.

Specified by:
  `insert` in interface `MilvusClient`
Overrides:
  `insert` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `InsertParam`
Returns:
  {status:result code, data: MutationResult{insert results}}

#### delete

    public R<io.milvus.grpc.MutationResult> delete​(DeleteParam requestParam)

Description copied from interface: `MilvusClient`
Deletes entity(s) based on primary key(s) filtered by boolean expression. Current release of Milvus only supports expression in the format "pk_field in [1, 2, ...]"

Specified by:
  `delete` in interface `MilvusClient`
Overrides:
  `delete` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DeleteParam`
Returns:
  {status:result code, data: MutationResult{delete results}}

#### search

    public R<io.milvus.grpc.SearchResults> search​(SearchParam requestParam)

Description copied from interface: `MilvusClient`
Conducts ANN search on a vector field. Use expression to do filtering before search.

Specified by:
  `search` in interface `MilvusClient`
Overrides:
  `search` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `SearchParam`
Returns:
  {status:result code, data: SearchResults{topK results}}

#### query

    public R<io.milvus.grpc.QueryResults> query​(QueryParam requestParam)

Description copied from interface: `MilvusClient`
Queries entity(s) based on scalar field(s) filtered by boolean expression. Note that the order of the returned entities cannot be guaranteed.

Specified by:
  `query` in interface `MilvusClient`
Overrides:
  `query` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `QueryParam`
Returns:
  {status:result code,data: QueryResults{filter results}}

#### getMetrics

    public R<io.milvus.grpc.GetMetricsResponse> getMetrics​(GetMetricsParam requestParam)

Description copied from interface: `MilvusClient`
Gets the runtime metrics information of Milvus, returns the result in .json format.

Specified by:
  `getMetrics` in interface `MilvusClient`
Overrides:
  `getMetrics` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetMetricsParam`
Returns:
  {status:result code, data:GetMetricsResponse{status,metrics}}

#### getFlushState

    public R<io.milvus.grpc.GetFlushStateResponse> getFlushState​(GetFlushStateParam requestParam)

Description copied from interface: `MilvusClient`
Get flush state of specified segments.

Specified by:
  `getFlushState` in interface `MilvusClient`
Overrides:
  `getFlushState` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetFlushStateParam`
Returns:
  {status:result code, data:GetMetricsResponse{status,metrics}}

#### getFlushAllState

    public R<io.milvus.grpc.GetFlushAllStateResponse> getFlushAllState​(GetFlushAllStateParam requestParam)

Description copied from interface: `MilvusClient`
Get flush state of all segments.

Specified by:
  `getFlushAllState` in interface `MilvusClient`
Overrides:
  `getFlushAllState` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetFlushAllStateParam`
Returns:
  {status:result code, data:GetMetricsResponse{status,metrics}}

#### getPersistentSegmentInfo

    public R<io.milvus.grpc.GetPersistentSegmentInfoResponse> getPersistentSegmentInfo​(GetPersistentSegmentInfoParam requestParam)

Description copied from interface: `MilvusClient`
Gets the information of persistent segments from data node, including row count, persistence state(growing or flushed), etc.

Specified by:
  `getPersistentSegmentInfo` in interface `MilvusClient`
Overrides:
  `getPersistentSegmentInfo` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetPersistentSegmentInfoParam`
Returns:
  {status:result code, data:GetPersistentSegmentInfoResponse{status,info}}

#### getQuerySegmentInfo

    public R<io.milvus.grpc.GetQuerySegmentInfoResponse> getQuerySegmentInfo​(GetQuerySegmentInfoParam requestParam)

Description copied from interface: `MilvusClient`
Gets the query information of segments in a collection from query node, including row count, memory usage size, index name, etc.

Specified by:
  `getQuerySegmentInfo` in interface `MilvusClient`
Overrides:
  `getQuerySegmentInfo` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetQuerySegmentInfoParam`
Returns:
  {status:result code, data:GetQuerySegmentInfoResponse{status,info}}

#### getReplicas

    public R<io.milvus.grpc.GetReplicasResponse> getReplicas​(GetReplicasParam requestParam)

Description copied from interface: `MilvusClient`
Returns the collection's replica information

Specified by:
  `getReplicas` in interface `MilvusClient`
Overrides:
  `getReplicas` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetReplicasParam`
Returns:
  {status:result code, data:GetReplicasResponse{status,info}}

#### loadBalance

    public R<RpcStatus> loadBalance​(LoadBalanceParam requestParam)

Description copied from interface: `MilvusClient`
Moves segment from a query node to another to keep the load balanced.

Specified by:
  `loadBalance` in interface `MilvusClient`
Overrides:
  `loadBalance` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `LoadBalanceParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### getCompactionState

    public R<io.milvus.grpc.GetCompactionStateResponse> getCompactionState​(GetCompactionStateParam requestParam)

Description copied from interface: `MilvusClient`
Gets the compaction state by id.

Specified by:
  `getCompactionState` in interface `MilvusClient`
Overrides:
  `getCompactionState` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetCompactionStateParam`
Returns:
  {status:result code, data:GetCompactionStateResponse{status,info}}

#### manualCompact

    public R<io.milvus.grpc.ManualCompactionResponse> manualCompact​(ManualCompactParam requestParam)

Description copied from interface: `MilvusClient`
Performs a manual compaction.

Specified by:
  `manualCompact` in interface `MilvusClient`
Overrides:
  `manualCompact` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `ManualCompactParam`
Returns:
  {status:result code, data:ManualCompactionResponse{status,info}}

#### getCompactionStateWithPlans

    public R<io.milvus.grpc.GetCompactionPlansResponse> getCompactionStateWithPlans​(GetCompactionPlansParam requestParam)

Description copied from interface: `MilvusClient`
Gets compaction state with its plan.

Specified by:
  `getCompactionStateWithPlans` in interface `MilvusClient`
Overrides:
  `getCompactionStateWithPlans` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetCompactionPlansParam`
Returns:
  {status:result code, data:GetCompactionPlansResponse{status,info}}

#### createCredential

    public R<RpcStatus> createCredential​(CreateCredentialParam requestParam)

Description copied from interface: `MilvusClient`
Create credential using the given user and password.

Specified by:
  `createCredential` in interface `MilvusClient`
Overrides:
  `createCredential` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `CreateCredentialParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### updateCredential

    public R<RpcStatus> updateCredential​(UpdateCredentialParam requestParam)

Description copied from interface: `MilvusClient`
Update credential using the given user and password. You must provide the original password to check if the operation is valid. Note: after this operation, client won't change the related header of this connection. So if you update credential for this connection, the connection may be invalid.

Specified by:
  `updateCredential` in interface `MilvusClient`
Overrides:
  `updateCredential` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `UpdateCredentialParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### deleteCredential

    public R<RpcStatus> deleteCredential​(DeleteCredentialParam requestParam)

Description copied from interface: `MilvusClient`
Delete credential corresponding to the user.

Specified by:
  `deleteCredential` in interface `MilvusClient`
Overrides:
  `deleteCredential` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DeleteCredentialParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### listCredUsers

    public R<io.milvus.grpc.ListCredUsersResponse> listCredUsers​(ListCredUsersParam requestParam)

Description copied from interface: `MilvusClient`
List all user names.

Specified by:
  `listCredUsers` in interface `MilvusClient`
Overrides:
  `listCredUsers` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `ListCredUsersParam`
Returns:
  {status:result code, data:ListCredUsersResponse{status,info}}

#### createRole

    public R<RpcStatus> createRole​(CreateRoleParam requestParam)

Description copied from interface: `MilvusClient`
It will success if the role isn't existed, otherwise fail.

Specified by:
  `createRole` in interface `MilvusClient`
Overrides:
  `createRole` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `CreateRoleParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### dropRole

    public R<RpcStatus> dropRole​(DropRoleParam requestParam)

Description copied from interface: `MilvusClient`
It will success if the role is existed, otherwise fail.

Specified by:
  `dropRole` in interface `MilvusClient`
Overrides:
  `dropRole` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DropRoleParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### addUserToRole

    public R<RpcStatus> addUserToRole​(AddUserToRoleParam requestParam)

Description copied from interface: `MilvusClient`
The user will get permissions that the role are allowed to perform operations.

Specified by:
  `addUserToRole` in interface `MilvusClient`
Overrides:
  `addUserToRole` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `AddUserToRoleParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### removeUserFromRole

    public R<RpcStatus> removeUserFromRole​(RemoveUserFromRoleParam requestParam)

Description copied from interface: `MilvusClient`
The user will remove permissions that the role are allowed to perform operations.

Specified by:
  `removeUserFromRole` in interface `MilvusClient`
Overrides:
  `removeUserFromRole` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `AddUserToRoleParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### selectRole

    public R<io.milvus.grpc.SelectRoleResponse> selectRole​(SelectRoleParam requestParam)

Description copied from interface: `MilvusClient`
Get all users who are added to the role.

Specified by:
  `selectRole` in interface `MilvusClient`
Overrides:
  `selectRole` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `SelectRoleParam`
Returns:
  {status:result code, data:SelectRoleResponse{status,info}}

#### selectUser

    public R<io.milvus.grpc.SelectUserResponse> selectUser​(SelectUserParam requestParam)

Description copied from interface: `MilvusClient`
Get all roles the user has.

Specified by:
  `selectUser` in interface `MilvusClient`
Overrides:
  `selectUser` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `SelectUserParam`
Returns:
  {status:result code, data:SelectUserResponse{status,info}}

#### grantRolePrivilege

    public R<RpcStatus> grantRolePrivilege​(GrantRolePrivilegeParam requestParam)

Description copied from interface: `MilvusClient`
Grant Role Privilege.

Specified by:
  `grantRolePrivilege` in interface `MilvusClient`
Overrides:
  `grantRolePrivilege` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GrantRolePrivilegeParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### revokeRolePrivilege

    public R<RpcStatus> revokeRolePrivilege​(RevokeRolePrivilegeParam requestParam)

Description copied from interface: `MilvusClient`
Revoke Role Privilege.

Specified by:
  `revokeRolePrivilege` in interface `MilvusClient`
Overrides:
  `revokeRolePrivilege` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `RevokeRolePrivilegeParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### selectGrantForRole

    public R<io.milvus.grpc.SelectGrantResponse> selectGrantForRole​(SelectGrantForRoleParam requestParam)

Description copied from interface: `MilvusClient`
List a grant info for the role and the specific object

Specified by:
  `selectGrantForRole` in interface `MilvusClient`
Overrides:
  `selectGrantForRole` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `SelectGrantForRoleParam`
Returns:
  {status:result code, data:SelectRoleResponse{status,info}}

#### selectGrantForRoleAndObject

    public R<io.milvus.grpc.SelectGrantResponse> selectGrantForRoleAndObject​(SelectGrantForRoleAndObjectParam requestParam)

Description copied from interface: `MilvusClient`
List a grant info for the role

Specified by:
  `selectGrantForRoleAndObject` in interface `MilvusClient`
Overrides:
  `selectGrantForRoleAndObject` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `SelectGrantForRoleAndObjectParam`
Returns:
  {status:result code, data:SelectRoleResponse{status,info}}

#### bulkInsert

    public R<io.milvus.grpc.ImportResponse> bulkInsert​(BulkInsertParam requestParam)

Description copied from interface: `MilvusClient`
Import data from external files, currently support JSON format

Specified by:
  `bulkInsert` in interface `MilvusClient`
Overrides:
  `bulkInsert` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `BulkInsertParam`
Returns:
  {status:result code, data:ImportResponse{status,info}}

#### getBulkInsertState

    public R<io.milvus.grpc.GetImportStateResponse> getBulkInsertState​(GetBulkInsertStateParam requestParam)

Description copied from interface: `MilvusClient`
Get state of bulk insert task

Specified by:
  `getBulkInsertState` in interface `MilvusClient`
Overrides:
  `getBulkInsertState` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetBulkInsertStateParam`
Returns:
  {status:result code, data:GetImportStateResponse{status,info}}

#### listBulkInsertTasks

    public R<io.milvus.grpc.ListImportTasksResponse> listBulkInsertTasks​(ListBulkInsertTasksParam requestParam)

Description copied from interface: `MilvusClient`
List bulk insert tasks

Specified by:
  `listBulkInsertTasks` in interface `MilvusClient`
Overrides:
  `listBulkInsertTasks` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `ListBulkInsertTasksParam`
Returns:
  {status:result code, data:ListImportTasksResponse{status,info}}

#### checkHealth

    public R<io.milvus.grpc.CheckHealthResponse> checkHealth()

Description copied from interface: `MilvusClient`
Check server health

Specified by:
  `checkHealth` in interface `MilvusClient`
Overrides:
  `checkHealth` in class `AbstractMilvusGrpcClient`
Returns:
  {status:result code, data:CheckHealthResponse{status,info}}

#### getVersion

    public R<io.milvus.grpc.GetVersionResponse> getVersion()

Description copied from interface: `MilvusClient`
Get server version

Specified by:
  `getVersion` in interface `MilvusClient`
Overrides:
  `getVersion` in class `AbstractMilvusGrpcClient`
Returns:
  {status:result code, data:GetVersionResponse{status,info}}

#### getLoadingProgress

    public R<io.milvus.grpc.GetLoadingProgressResponse> getLoadingProgress​(GetLoadingProgressParam requestParam)

Description copied from interface: `MilvusClient`
Get collection loading progress

Specified by:
  `getLoadingProgress` in interface `MilvusClient`
Overrides:
  `getLoadingProgress` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetLoadingProgressParam`
Returns:
  {status:result code, data:GetLoadingProgressResponse{status}}

#### getLoadState

    public R<io.milvus.grpc.GetLoadStateResponse> getLoadState​(GetLoadStateParam requestParam)

Description copied from interface: `MilvusClient`
Get collection loading state

Specified by:
  `getLoadState` in interface `MilvusClient`
Overrides:
  `getLoadState` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetLoadStateParam`
Returns:
  {status:result code, data:GetLoadStateResponse{status}}

#### createCollection

    public R<RpcStatus> createCollection​(CreateSimpleCollectionParam requestParam)

Description copied from interface: `MilvusClient`
Creates a collection in Milvus.

Specified by:
  `createCollection` in interface `MilvusClient`
Overrides:
  `createCollection` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `CreateSimpleCollectionParam`
Returns:
  {status:result code, data:RpcStatus{msg: result message}}

#### listCollections

    public R<ListCollectionsResponse> listCollections​(ListCollectionsParam requestParam)

Description copied from interface: `MilvusClient`
Lists all collections

Specified by:
  `listCollections` in interface `MilvusClient`
Overrides:
  `listCollections` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `ListCollectionsParam`
Returns:
  {status:result code, data: ListCollectionsResponse{collection_names}}

#### insert

    public R<InsertResponse> insert​(InsertRowsParam requestParam)

Description copied from interface: `MilvusClient`
Inserts rows data into a specified collection . Note that you don't need to input primary key field if auto_id is enabled.

Specified by:
  `insert` in interface `MilvusClient`
Overrides:
  `insert` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `InsertRowsParam`
Returns:
  {status:result code, data: MutationResult{insert results}}

#### delete

    public R<DeleteResponse> delete​(DeleteIdsParam requestParam)

Description copied from interface: `MilvusClient`
Deletes entity(s) based on the value of primary key.

Specified by:
  `delete` in interface `MilvusClient`
Overrides:
  `delete` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `DeleteIdsParam`
Returns:
  {status:result code, data: MutationResult{delete results}}

#### get

    public R<GetResponse> get​(GetIdsParam requestParam)

Description copied from interface: `MilvusClient`
Get entity(s) based on the value of primary key.

Specified by:
  `get` in interface `MilvusClient`
Overrides:
  `get` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `GetIdsParam`
Returns:
  {status:result code, data: QueryResults{query results}}

#### query

    public R<QueryResponse> query​(QuerySimpleParam requestParam)

Description copied from interface: `MilvusClient`
Queries entity(s) based on scalar field(s) filtered by boolean expression. Note that the order of the returned entities cannot be guaranteed.

Specified by:
  `query` in interface `MilvusClient`
Overrides:
  `query` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `QuerySimpleParam`
Returns:
  {status:result code,data: QueryResults{filter results}}

#### search

    public R<SearchResponse> search​(SearchSimpleParam requestParam)

Description copied from interface: `MilvusClient`
Conducts ANN search on a vector field. Use expression to do filtering before search.

Specified by:
  `search` in interface `MilvusClient`
Overrides:
  `search` in class `AbstractMilvusGrpcClient`
Parameters:
  `requestParam` - `SearchSimpleParam`
Returns:
  {status:result code, data: SearchResults{topK results}}