2021-01-14 14:24:14 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
package milvus.proto.milvus;
|
|
|
|
|
2021-04-22 14:45:57 +08:00
|
|
|
option go_package = "github.com/milvus-io/milvus/internal/proto/milvuspb";
|
2021-01-14 14:24:14 +08:00
|
|
|
|
|
|
|
import "common.proto";
|
2021-01-15 20:12:26 +08:00
|
|
|
import "schema.proto";
|
2021-01-14 14:24:14 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
service MilvusService {
|
|
|
|
rpc CreateCollection(CreateCollectionRequest) returns (common.Status) {}
|
|
|
|
rpc DropCollection(DropCollectionRequest) returns (common.Status) {}
|
|
|
|
rpc HasCollection(HasCollectionRequest) returns (BoolResponse) {}
|
|
|
|
rpc LoadCollection(LoadCollectionRequest) returns (common.Status) {}
|
|
|
|
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
|
|
|
|
rpc DescribeCollection(DescribeCollectionRequest) returns (DescribeCollectionResponse) {}
|
|
|
|
rpc GetCollectionStatistics(GetCollectionStatisticsRequest) returns (GetCollectionStatisticsResponse) {}
|
|
|
|
rpc ShowCollections(ShowCollectionsRequest) returns (ShowCollectionsResponse) {}
|
|
|
|
|
|
|
|
rpc CreatePartition(CreatePartitionRequest) returns (common.Status) {}
|
|
|
|
rpc DropPartition(DropPartitionRequest) returns (common.Status) {}
|
|
|
|
rpc HasPartition(HasPartitionRequest) returns (BoolResponse) {}
|
|
|
|
rpc LoadPartitions(LoadPartitionsRequest) returns (common.Status) {}
|
|
|
|
rpc ReleasePartitions(ReleasePartitionsRequest) returns (common.Status) {}
|
|
|
|
rpc GetPartitionStatistics(GetPartitionStatisticsRequest) returns (GetPartitionStatisticsResponse) {}
|
|
|
|
rpc ShowPartitions(ShowPartitionsRequest) returns (ShowPartitionsResponse) {}
|
|
|
|
|
2021-09-18 11:13:51 +08:00
|
|
|
rpc CreateAlias(CreateAliasRequest) returns (common.Status) {}
|
|
|
|
rpc DropAlias(DropAliasRequest) returns (common.Status) {}
|
|
|
|
rpc AlterAlias(AlterAliasRequest) returns (common.Status) {}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
rpc CreateIndex(CreateIndexRequest) returns (common.Status) {}
|
|
|
|
rpc DescribeIndex(DescribeIndexRequest) returns (DescribeIndexResponse) {}
|
|
|
|
rpc GetIndexState(GetIndexStateRequest) returns (GetIndexStateResponse) {}
|
2021-04-27 15:46:45 +08:00
|
|
|
rpc GetIndexBuildProgress(GetIndexBuildProgressRequest) returns (GetIndexBuildProgressResponse) {}
|
2021-03-12 14:22:09 +08:00
|
|
|
rpc DropIndex(DropIndexRequest) returns (common.Status) {}
|
|
|
|
|
2021-06-21 11:42:18 +08:00
|
|
|
rpc Insert(InsertRequest) returns (MutationResult) {}
|
2021-08-26 12:15:52 +08:00
|
|
|
rpc Delete(DeleteRequest) returns (MutationResult) {}
|
2021-03-12 14:22:09 +08:00
|
|
|
rpc Search(SearchRequest) returns (SearchResults) {}
|
2021-06-23 16:56:11 +08:00
|
|
|
rpc Flush(FlushRequest) returns (FlushResponse) {}
|
2021-06-04 12:02:34 +08:00
|
|
|
rpc Query(QueryRequest) returns (QueryResults) {}
|
2021-07-01 18:56:17 +08:00
|
|
|
rpc CalcDistance(CalcDistanceRequest) returns (CalcDistanceResults) {}
|
2021-03-12 14:22:09 +08:00
|
|
|
|
|
|
|
rpc GetPersistentSegmentInfo(GetPersistentSegmentInfoRequest) returns (GetPersistentSegmentInfoResponse) {}
|
|
|
|
rpc GetQuerySegmentInfo(GetQuerySegmentInfoRequest) returns (GetQuerySegmentInfoResponse) {}
|
|
|
|
|
2021-05-25 14:44:43 +08:00
|
|
|
rpc Dummy(DummyRequest) returns (DummyResponse) {}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
// TODO: remove
|
|
|
|
rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
|
2021-08-18 10:12:10 +08:00
|
|
|
|
|
|
|
// https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
|
|
|
|
rpc GetMetrics(GetMetricsRequest) returns (GetMetricsResponse) {}
|
2021-03-12 14:22:09 +08:00
|
|
|
}
|
|
|
|
|
2021-09-18 11:13:51 +08:00
|
|
|
message CreateAliasRequest {
|
|
|
|
common.MsgBase base = 1;
|
2021-10-01 21:40:21 +08:00
|
|
|
string db_name = 2;
|
|
|
|
string collection_name = 3;
|
|
|
|
string alias = 4;
|
2021-09-18 11:13:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DropAliasRequest {
|
|
|
|
common.MsgBase base = 1;
|
2021-10-01 21:40:21 +08:00
|
|
|
string db_name = 2;
|
|
|
|
string alias = 3;
|
2021-09-18 11:13:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message AlterAliasRequest{
|
|
|
|
common.MsgBase base = 1;
|
2021-10-01 21:40:21 +08:00
|
|
|
string db_name = 2;
|
|
|
|
string collection_name = 3;
|
|
|
|
string alias = 4;
|
2021-09-18 11:13:51 +08:00
|
|
|
}
|
|
|
|
|
2021-09-10 10:06:00 +08:00
|
|
|
/**
|
2021-09-18 11:13:51 +08:00
|
|
|
* Create collection in milvus
|
2021-09-10 10:06:00 +08:00
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message CreateCollectionRequest {
|
2021-09-10 10:06:00 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-10 10:06:00 +08:00
|
|
|
// The unique collection name in milvus.(Required)
|
|
|
|
string collection_name = 3;
|
|
|
|
// The serialized `schema.CollectionSchema`(Required)
|
|
|
|
bytes schema = 4;
|
|
|
|
// Once set, no modification is allowed (Optional)
|
2021-09-16 10:21:53 +08:00
|
|
|
// https://github.com/milvus-io/milvus/issues/6690
|
2021-09-10 10:06:00 +08:00
|
|
|
int32 shards_num = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-14 09:53:21 +08:00
|
|
|
/**
|
|
|
|
* Drop collection in milvus, also will drop data in collection.
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message DropCollectionRequest {
|
2021-09-14 09:53:21 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-14 09:53:21 +08:00
|
|
|
// The unique collection name in milvus.(Required)
|
|
|
|
string collection_name = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-14 09:53:21 +08:00
|
|
|
/**
|
|
|
|
* Check collection exist in milvus or not.
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message HasCollectionRequest {
|
2021-09-14 09:53:21 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-14 09:53:21 +08:00
|
|
|
// The collection name you want to check.
|
|
|
|
string collection_name = 3;
|
2021-10-11 21:23:50 +08:00
|
|
|
// If time_stamp is not zero, will return true when time_stamp >= created collection timestamp, otherwise will return false.
|
2021-05-18 17:12:17 +08:00
|
|
|
uint64 time_stamp = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-16 10:21:53 +08:00
|
|
|
|
2021-01-15 20:12:26 +08:00
|
|
|
message BoolResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
bool value = 2;
|
|
|
|
}
|
|
|
|
|
2021-01-18 21:39:56 +08:00
|
|
|
message StringResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
string value = 2;
|
|
|
|
}
|
|
|
|
|
2021-09-16 10:21:53 +08:00
|
|
|
/**
|
|
|
|
* Get collection meta datas like: schema, collectionID, shards number ...
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message DescribeCollectionRequest {
|
2021-09-16 10:21:53 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-10-11 21:23:50 +08:00
|
|
|
// The collection name you want to describe, you can pass collection_name or collectionID
|
2021-09-16 10:21:53 +08:00
|
|
|
string collection_name = 3;
|
2021-10-11 21:23:50 +08:00
|
|
|
// The collection ID you want to describe
|
2021-02-25 16:08:56 +08:00
|
|
|
int64 collectionID = 4;
|
2021-10-11 21:23:50 +08:00
|
|
|
// If time_stamp is not zero, will describe collection success when time_stamp >= created collection timestamp, otherwise will throw error.
|
2021-05-18 17:12:17 +08:00
|
|
|
uint64 time_stamp = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-16 10:21:53 +08:00
|
|
|
/**
|
|
|
|
* DescribeCollection Response
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message DescribeCollectionResponse {
|
2021-09-16 10:21:53 +08:00
|
|
|
// Contain error_code and reason
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 1;
|
2021-09-16 10:21:53 +08:00
|
|
|
// The schema param when you created collection.
|
2021-01-15 20:12:26 +08:00
|
|
|
schema.CollectionSchema schema = 2;
|
2021-09-16 10:21:53 +08:00
|
|
|
// The collection id
|
2021-01-22 15:41:54 +08:00
|
|
|
int64 collectionID = 3;
|
2021-09-16 10:21:53 +08:00
|
|
|
// System design related, users should not perceive
|
2021-05-17 19:15:01 +08:00
|
|
|
repeated string virtual_channel_names = 4;
|
2021-09-16 10:21:53 +08:00
|
|
|
// System design related, users should not perceive
|
2021-05-17 19:15:01 +08:00
|
|
|
repeated string physical_channel_names = 5;
|
2021-09-16 10:21:53 +08:00
|
|
|
// Hybrid timestamp in milvus
|
|
|
|
uint64 created_timestamp = 6;
|
|
|
|
// The utc timestamp calculated by created_timestamp
|
|
|
|
uint64 created_utc_timestamp = 7;
|
|
|
|
// The shards number you set.
|
2021-09-18 11:13:51 +08:00
|
|
|
int32 shards_num = 8;
|
|
|
|
// The aliases of this collection
|
|
|
|
repeated string aliases = 9;
|
2021-09-27 14:13:58 +08:00
|
|
|
// The message ID/posititon when collection is created
|
|
|
|
repeated common.KeyDataPair start_positions = 10;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-18 09:33:51 +08:00
|
|
|
/**
|
|
|
|
* Load collection data into query nodes, then you can do vector search on this collection.
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message LoadCollectionRequest {
|
2021-09-18 09:33:51 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-18 09:33:51 +08:00
|
|
|
// The collection name you want to load
|
|
|
|
string collection_name = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-18 09:33:51 +08:00
|
|
|
/**
|
|
|
|
* Release collection data from query nodes, then you can't do vector search on this collection.
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message ReleaseCollectionRequest {
|
2021-09-18 09:33:51 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-18 09:33:51 +08:00
|
|
|
// The collection name you want to release
|
|
|
|
string collection_name = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-18 09:33:51 +08:00
|
|
|
/**
|
|
|
|
* Get collection statistics like row_count.
|
|
|
|
*/
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetCollectionStatisticsRequest {
|
2021-09-18 09:33:51 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-18 09:33:51 +08:00
|
|
|
// The collection name you want get statistics
|
|
|
|
string collection_name = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-18 09:33:51 +08:00
|
|
|
/**
|
|
|
|
* Will return collection statistics in stats field like [{key:"row_count",value:"1"}]
|
|
|
|
*/
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetCollectionStatisticsResponse {
|
2021-09-18 09:33:51 +08:00
|
|
|
// Contain error_code and reason
|
2021-01-18 21:39:56 +08:00
|
|
|
common.Status status = 1;
|
2021-09-18 09:33:51 +08:00
|
|
|
// Collection statistics data
|
2021-01-18 21:39:56 +08:00
|
|
|
repeated common.KeyValuePair stats = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-22 20:14:08 +08:00
|
|
|
/*
|
|
|
|
* This is for ShowCollectionsRequest type field.
|
|
|
|
*/
|
2021-08-02 22:39:25 +08:00
|
|
|
enum ShowType {
|
2021-09-22 20:14:08 +08:00
|
|
|
// Will return all colloections
|
2021-06-03 19:09:33 +08:00
|
|
|
All = 0;
|
2021-09-22 20:14:08 +08:00
|
|
|
// Will return loaded collections with their inMemory_percentages
|
2021-06-03 19:09:33 +08:00
|
|
|
InMemory = 1;
|
|
|
|
}
|
|
|
|
|
2021-09-22 20:14:08 +08:00
|
|
|
/*
|
|
|
|
* List collections
|
|
|
|
*/
|
2021-03-12 14:22:09 +08:00
|
|
|
message ShowCollectionsRequest {
|
2021-09-22 20:14:08 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-22 20:14:08 +08:00
|
|
|
// Not useful for now
|
2021-05-18 17:12:17 +08:00
|
|
|
uint64 time_stamp = 3;
|
2021-09-22 20:14:08 +08:00
|
|
|
// Decide return Loaded collections or All collections(Optional)
|
2021-08-02 22:39:25 +08:00
|
|
|
ShowType type = 4;
|
2021-09-22 20:14:08 +08:00
|
|
|
// When type is InMemory, will return these collection's inMemory_percentages.(Optional)
|
|
|
|
repeated string collection_names = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-22 20:14:08 +08:00
|
|
|
/*
|
|
|
|
* Return basic collection infos.
|
|
|
|
*/
|
2021-03-12 14:22:09 +08:00
|
|
|
message ShowCollectionsResponse {
|
2021-09-22 20:14:08 +08:00
|
|
|
// Contain error_code and reason
|
2021-01-18 21:39:56 +08:00
|
|
|
common.Status status = 1;
|
2021-09-22 20:14:08 +08:00
|
|
|
// Collection name array
|
2021-01-18 21:39:56 +08:00
|
|
|
repeated string collection_names = 2;
|
2021-09-22 20:14:08 +08:00
|
|
|
// Collection Id array
|
2021-06-03 19:09:33 +08:00
|
|
|
repeated int64 collection_ids = 3;
|
2021-09-22 20:14:08 +08:00
|
|
|
// Hybrid timestamps in milvus
|
|
|
|
repeated uint64 created_timestamps = 4;
|
|
|
|
// The utc timestamp calculated by created_timestamp
|
|
|
|
repeated uint64 created_utc_timestamps = 5;
|
|
|
|
// Load percentage on querynode when type is InMemory
|
|
|
|
repeated int64 inMemory_percentages = 6;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-22 20:14:08 +08:00
|
|
|
/*
|
|
|
|
* Create partition in created collection.
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message CreatePartitionRequest {
|
2021-09-22 20:14:08 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-22 20:14:08 +08:00
|
|
|
// The collection name in milvus
|
|
|
|
string collection_name = 3;
|
|
|
|
// The partition name you want to create.
|
|
|
|
string partition_name = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:32:13 +08:00
|
|
|
/*
|
|
|
|
* Drop partition in created collection.
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message DropPartitionRequest {
|
2021-09-28 22:32:13 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-28 22:32:13 +08:00
|
|
|
// The collection name in milvus
|
|
|
|
string collection_name = 3;
|
|
|
|
// The partition name you want to drop
|
|
|
|
string partition_name = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:32:13 +08:00
|
|
|
/*
|
|
|
|
* Check if partition exist in collection or not.
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message HasPartitionRequest {
|
2021-09-28 22:32:13 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-28 22:32:13 +08:00
|
|
|
// The collection name in milvus
|
|
|
|
string collection_name = 3;
|
|
|
|
// The partition name you want to check
|
|
|
|
string partition_name = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:32:13 +08:00
|
|
|
/*
|
|
|
|
* Load specific partitions data of one collection into query nodes
|
|
|
|
* Then you can get these data as result when you do vector search on this collection.
|
|
|
|
*/
|
2021-03-12 14:22:09 +08:00
|
|
|
message LoadPartitionsRequest {
|
2021-09-28 22:32:13 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 14:24:14 +08:00
|
|
|
string db_name = 2;
|
2021-09-28 22:32:13 +08:00
|
|
|
// The collection name in milvus
|
|
|
|
string collection_name = 3;
|
|
|
|
// The partition names you want to load
|
|
|
|
repeated string partition_names = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:32:13 +08:00
|
|
|
/*
|
|
|
|
* Release specific partitions data of one collection from query nodes.
|
|
|
|
* Then you can not get these data as result when you do vector search on this collection.
|
|
|
|
*/
|
2021-03-12 14:22:09 +08:00
|
|
|
message ReleasePartitionsRequest {
|
2021-09-28 22:32:13 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-09-28 22:32:13 +08:00
|
|
|
// The collection name in milvus
|
|
|
|
string collection_name = 3;
|
|
|
|
// The partition names you want to release
|
|
|
|
repeated string partition_names = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-10-11 21:23:50 +08:00
|
|
|
/*
|
|
|
|
* Get partition statistics like row_count.
|
|
|
|
*/
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetPartitionStatisticsRequest {
|
2021-10-11 21:23:50 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-10-11 21:23:50 +08:00
|
|
|
// The collection name in milvus
|
|
|
|
string collection_name = 3;
|
|
|
|
// The partition name you want to collect statistics
|
|
|
|
string partition_name = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetPartitionStatisticsResponse {
|
2021-01-18 21:39:56 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated common.KeyValuePair stats = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
2021-10-13 19:05:12 +08:00
|
|
|
|
2021-10-11 21:23:50 +08:00
|
|
|
/*
|
|
|
|
* List all partitions for particular collection
|
|
|
|
*/
|
2021-03-12 14:22:09 +08:00
|
|
|
message ShowPartitionsRequest {
|
2021-10-11 21:23:50 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-10-11 21:23:50 +08:00
|
|
|
// The collection name you want to describe, you can pass collection_name or collectionID
|
|
|
|
string collection_name = 3;
|
|
|
|
// The collection id in milvus
|
2021-01-18 19:32:08 +08:00
|
|
|
int64 collectionID = 4;
|
2021-10-11 21:23:50 +08:00
|
|
|
// When type is InMemory, will return these patitions's inMemory_percentages.(Optional)
|
|
|
|
repeated string partition_names = 5;
|
|
|
|
// Decide return Loaded partitions or All partitions(Optional)
|
2021-08-02 22:39:25 +08:00
|
|
|
ShowType type = 6;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-10-13 19:05:12 +08:00
|
|
|
/*
|
|
|
|
* List all partitions for particular collection response.
|
|
|
|
* The returned datas are all rows, we can format to columns by therir index.
|
|
|
|
*/
|
2021-03-12 14:22:09 +08:00
|
|
|
message ShowPartitionsResponse {
|
2021-10-13 19:05:12 +08:00
|
|
|
// Contain error_code and reason
|
2021-01-18 21:39:56 +08:00
|
|
|
common.Status status = 1;
|
2021-10-13 19:05:12 +08:00
|
|
|
// All partition names for this collection
|
2021-01-18 21:39:56 +08:00
|
|
|
repeated string partition_names = 2;
|
2021-10-13 19:05:12 +08:00
|
|
|
// All partition ids for this collection
|
2021-01-18 21:39:56 +08:00
|
|
|
repeated int64 partitionIDs = 3;
|
2021-10-13 19:05:12 +08:00
|
|
|
// All hybrid timestamps
|
|
|
|
repeated uint64 created_timestamps = 4;
|
|
|
|
// All utc timestamps calculated by created_timestamps
|
|
|
|
repeated uint64 created_utc_timestamps = 5;
|
|
|
|
// Load percentage on querynode
|
|
|
|
repeated int64 inMemory_percentages = 6;
|
2021-01-18 19:32:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeSegmentRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 segmentID = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeSegmentResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
int64 indexID = 2;
|
2021-01-28 17:25:43 +08:00
|
|
|
int64 buildID = 3;
|
2021-03-08 15:46:51 +08:00
|
|
|
bool enable_index = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message ShowSegmentsRequest {
|
2021-01-18 19:32:08 +08:00
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message ShowSegmentsResponse {
|
2021-01-18 19:32:08 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated int64 segmentIDs = 2;
|
|
|
|
}
|
2021-01-14 14:24:14 +08:00
|
|
|
|
2021-10-14 18:46:59 +08:00
|
|
|
/*
|
|
|
|
* Create index for vector datas
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message CreateIndexRequest {
|
2021-10-14 18:46:59 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-10-14 18:46:59 +08:00
|
|
|
// The particular collection name you want to create index.
|
|
|
|
string collection_name = 3;
|
|
|
|
// The vector field name in this particular collection
|
|
|
|
string field_name = 4;
|
|
|
|
// Support keys: index_type,metric_type, params. Different index_type may has different params.
|
|
|
|
repeated common.KeyValuePair extra_params = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-10-19 11:16:34 +08:00
|
|
|
/*
|
|
|
|
* Get created index information.
|
|
|
|
* Current release of Milvus only supports showing latest built index.
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message DescribeIndexRequest {
|
2021-10-19 11:16:34 +08:00
|
|
|
// Not useful for now
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
// Not useful for now
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-10-19 11:16:34 +08:00
|
|
|
// The particular collection name in Milvus
|
|
|
|
string collection_name = 3;
|
|
|
|
// The vector field name in this particular collection
|
2021-01-14 14:24:14 +08:00
|
|
|
string field_name = 4;
|
2021-10-19 11:16:34 +08:00
|
|
|
// No need to set up for now @2021.06.30
|
|
|
|
string index_name = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-10-25 19:58:18 +08:00
|
|
|
/*
|
|
|
|
* Index informations
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message IndexDescription {
|
2021-10-25 19:58:18 +08:00
|
|
|
// Index name
|
2021-01-14 14:24:14 +08:00
|
|
|
string index_name = 1;
|
2021-10-25 19:58:18 +08:00
|
|
|
// Index id
|
2021-03-12 14:22:09 +08:00
|
|
|
int64 indexID = 2;
|
2021-10-25 19:58:18 +08:00
|
|
|
// Will return index_type, metric_type, params(like nlist).
|
2021-02-08 14:20:29 +08:00
|
|
|
repeated common.KeyValuePair params = 3;
|
2021-10-25 19:58:18 +08:00
|
|
|
// The vector field name
|
2021-04-27 10:30:55 +08:00
|
|
|
string field_name = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-10-25 19:58:18 +08:00
|
|
|
/*
|
|
|
|
* Describe index response
|
|
|
|
*/
|
2021-01-14 14:24:14 +08:00
|
|
|
message DescribeIndexResponse {
|
2021-10-25 19:58:18 +08:00
|
|
|
// Response status
|
2021-01-18 19:32:08 +08:00
|
|
|
common.Status status = 1;
|
2021-10-25 19:58:18 +08:00
|
|
|
// All index informations, for now only return tha latest index you created for the collection.
|
2021-01-18 19:32:08 +08:00
|
|
|
repeated IndexDescription index_descriptions = 2;
|
|
|
|
}
|
|
|
|
|
2021-04-27 15:46:45 +08:00
|
|
|
message GetIndexBuildProgressRequest {
|
2021-05-27 16:34:31 +08:00
|
|
|
common.MsgBase base = 1; // must
|
2021-04-27 15:46:45 +08:00
|
|
|
string db_name = 2 ;
|
2021-05-27 16:34:31 +08:00
|
|
|
string collection_name = 3; // must
|
2021-04-27 15:46:45 +08:00
|
|
|
string field_name = 4;
|
2021-05-27 16:34:31 +08:00
|
|
|
string index_name = 5; // must
|
2021-04-27 15:46:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetIndexBuildProgressResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
int64 indexed_rows = 2;
|
|
|
|
int64 total_rows = 3;
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetIndexStateRequest {
|
2021-05-27 16:34:31 +08:00
|
|
|
common.MsgBase base = 1; // must
|
2021-01-18 19:32:08 +08:00
|
|
|
string db_name = 2 ;
|
2021-05-27 16:34:31 +08:00
|
|
|
string collection_name = 3; // must
|
2021-01-18 19:32:08 +08:00
|
|
|
string field_name = 4;
|
2021-05-27 16:34:31 +08:00
|
|
|
string index_name = 5; // No need to set up for now @2021.06.30
|
2021-01-18 19:32:08 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetIndexStateResponse {
|
2021-01-18 19:32:08 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
common.IndexState state = 2;
|
2021-07-29 14:47:22 +08:00
|
|
|
string fail_reason = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-02-20 10:14:03 +08:00
|
|
|
message DropIndexRequest {
|
2021-05-27 16:34:31 +08:00
|
|
|
common.MsgBase base = 1; // must
|
2021-02-20 10:14:03 +08:00
|
|
|
string db_name = 2;
|
2021-05-27 16:34:31 +08:00
|
|
|
string collection_name = 3; // must
|
2021-02-20 10:14:03 +08:00
|
|
|
string field_name = 4;
|
2021-05-27 16:34:31 +08:00
|
|
|
string index_name = 5; // No need to set up for now @2021.06.30
|
2021-02-20 10:14:03 +08:00
|
|
|
}
|
|
|
|
|
2021-01-14 14:24:14 +08:00
|
|
|
message InsertRequest {
|
2021-06-03 15:03:34 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-06-03 15:03:34 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
string partition_name = 4;
|
|
|
|
repeated schema.FieldData fields_data = 5;
|
|
|
|
repeated uint32 hash_keys = 6;
|
2021-06-21 11:42:18 +08:00
|
|
|
uint32 num_rows = 7;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-21 11:42:18 +08:00
|
|
|
message MutationResult {
|
2021-01-18 21:39:56 +08:00
|
|
|
common.Status status = 1;
|
2021-06-21 11:42:18 +08:00
|
|
|
schema.IDs IDs = 2; // required for insert, delete
|
|
|
|
repeated uint32 succ_index = 3; // error indexes indicate
|
|
|
|
repeated uint32 err_index = 4; // error indexes indicate
|
|
|
|
bool acknowledged = 5;
|
|
|
|
int64 insert_cnt = 6;
|
|
|
|
int64 delete_cnt = 7;
|
|
|
|
int64 upsert_cnt = 8;
|
|
|
|
uint64 timestamp = 9;
|
2021-01-15 20:12:26 +08:00
|
|
|
}
|
|
|
|
|
2021-08-26 12:15:52 +08:00
|
|
|
message DeleteRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string db_name = 2;
|
|
|
|
string collection_name = 3;
|
|
|
|
string partition_name = 4;
|
|
|
|
string expr = 5;
|
2021-10-25 21:20:44 +08:00
|
|
|
repeated uint32 hash_keys = 6;
|
2021-08-26 12:15:52 +08:00
|
|
|
}
|
|
|
|
|
2021-01-15 20:12:26 +08:00
|
|
|
enum PlaceholderType {
|
2021-03-12 14:22:09 +08:00
|
|
|
None = 0;
|
|
|
|
BinaryVector = 100;
|
|
|
|
FloatVector = 101;
|
2021-01-15 20:12:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message PlaceholderValue {
|
|
|
|
string tag = 1;
|
|
|
|
PlaceholderType type = 2;
|
|
|
|
// values is a 2d-array, every array contains a vector
|
|
|
|
repeated bytes values = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PlaceholderGroup {
|
|
|
|
repeated PlaceholderValue placeholders = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message SearchRequest {
|
2021-05-27 16:34:31 +08:00
|
|
|
common.MsgBase base = 1; // must
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-05-27 16:34:31 +08:00
|
|
|
string collection_name = 3; // must
|
|
|
|
repeated string partition_names = 4; // must
|
|
|
|
string dsl = 5; // must
|
2021-01-15 20:12:26 +08:00
|
|
|
// serialized `PlaceholderGroup`
|
2021-05-27 16:34:31 +08:00
|
|
|
bytes placeholder_group = 6; // must
|
|
|
|
common.DslType dsl_type = 7; // must
|
2021-06-21 20:18:13 +08:00
|
|
|
repeated string output_fields = 8;
|
|
|
|
repeated common.KeyValuePair search_params = 9; // must
|
|
|
|
uint64 travel_timestamp = 10;
|
2021-06-30 21:02:13 +08:00
|
|
|
uint64 guarantee_timestamp = 11; // guarantee_timestamp
|
2021-01-15 20:12:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message Hits {
|
|
|
|
repeated int64 IDs = 1;
|
|
|
|
repeated bytes row_data = 2;
|
|
|
|
repeated float scores = 3;
|
|
|
|
}
|
|
|
|
|
2021-01-18 19:32:08 +08:00
|
|
|
message SearchResults {
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 1;
|
2021-06-21 20:18:13 +08:00
|
|
|
schema.SearchResultData results = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message FlushRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
string db_name = 2;
|
2021-02-03 17:30:10 +08:00
|
|
|
repeated string collection_names = 3;
|
2021-01-15 20:12:26 +08:00
|
|
|
}
|
|
|
|
|
2021-06-23 16:56:11 +08:00
|
|
|
message FlushResponse{
|
|
|
|
common.Status status = 1;
|
|
|
|
string db_name = 2;
|
|
|
|
map<string, schema.LongArray> coll_segIDs = 3;
|
|
|
|
}
|
|
|
|
|
2021-06-04 12:02:34 +08:00
|
|
|
message QueryRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string db_name = 2;
|
|
|
|
string collection_name = 3;
|
|
|
|
string expr = 4;
|
|
|
|
repeated string output_fields = 5;
|
|
|
|
repeated string partition_names = 6;
|
2021-08-16 17:06:10 +08:00
|
|
|
uint64 travel_timestamp = 7;
|
|
|
|
uint64 guarantee_timestamp = 8; // guarantee_timestamp
|
2021-06-04 12:02:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message QueryResults {
|
|
|
|
common.Status status = 1;
|
|
|
|
repeated schema.FieldData fields_data = 2;
|
|
|
|
}
|
|
|
|
|
2021-07-01 18:56:17 +08:00
|
|
|
message VectorIDs {
|
|
|
|
string collection_name = 1;
|
|
|
|
string field_name = 2;
|
|
|
|
schema.IDs id_array = 3;
|
|
|
|
repeated string partition_names = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message VectorsArray {
|
|
|
|
oneof array {
|
|
|
|
VectorIDs id_array = 1; // vector ids
|
|
|
|
schema.VectorField data_array = 2; // vectors data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message CalcDistanceRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
VectorsArray op_left = 2; // vectors on the left of operator
|
|
|
|
VectorsArray op_right = 3; // vectors on the right of operator
|
|
|
|
repeated common.KeyValuePair params = 4; // "metric":"L2"/"IP"/"HAMMIN"/"TANIMOTO"
|
|
|
|
}
|
|
|
|
|
|
|
|
message CalcDistanceResults {
|
|
|
|
common.Status status = 1;
|
|
|
|
// num(op_left)*num(op_right) distance values, "HAMMIN" return integer distance
|
|
|
|
oneof array {
|
|
|
|
schema.IntArray int_dist = 2;
|
|
|
|
schema.FloatArray float_dist = 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-03 18:55:00 +08:00
|
|
|
message PersistentSegmentInfo {
|
|
|
|
int64 segmentID = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
2021-05-21 14:51:25 +08:00
|
|
|
int64 num_rows = 4;
|
|
|
|
common.SegmentState state = 5;
|
2021-02-03 18:55:00 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetPersistentSegmentInfoRequest {
|
2021-05-27 16:34:31 +08:00
|
|
|
common.MsgBase base = 1; // must
|
2021-02-03 18:55:00 +08:00
|
|
|
string dbName = 2;
|
2021-05-27 16:34:31 +08:00
|
|
|
string collectionName = 3; // must
|
2021-02-03 18:55:00 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetPersistentSegmentInfoResponse {
|
2021-02-03 18:55:00 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated PersistentSegmentInfo infos = 2;
|
|
|
|
}
|
|
|
|
|
2021-02-04 14:37:12 +08:00
|
|
|
message QuerySegmentInfo {
|
|
|
|
int64 segmentID = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
|
|
|
int64 mem_size = 4;
|
|
|
|
int64 num_rows = 5;
|
|
|
|
string index_name = 6;
|
|
|
|
int64 indexID = 7;
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetQuerySegmentInfoRequest {
|
2021-05-27 16:34:31 +08:00
|
|
|
common.MsgBase base = 1; // must
|
2021-02-04 14:37:12 +08:00
|
|
|
string dbName = 2;
|
2021-05-27 16:34:31 +08:00
|
|
|
string collectionName = 3; // must
|
2021-02-04 14:37:12 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetQuerySegmentInfoResponse {
|
2021-02-04 14:37:12 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated QuerySegmentInfo infos = 2;
|
|
|
|
}
|
|
|
|
|
2021-05-25 14:44:43 +08:00
|
|
|
message DummyRequest {
|
|
|
|
string request_type = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DummyResponse {
|
|
|
|
string response = 1;
|
|
|
|
}
|
2021-02-03 18:55:00 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message RegisterLinkRequest {
|
2021-01-15 20:12:26 +08:00
|
|
|
}
|
2021-01-22 12:57:23 +08:00
|
|
|
|
|
|
|
message RegisterLinkResponse {
|
|
|
|
common.Address address = 1;
|
|
|
|
common.Status status = 2;
|
|
|
|
}
|
|
|
|
|
2021-08-17 10:06:11 +08:00
|
|
|
message GetMetricsRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string request = 2; // request is of jsonic format
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetMetricsResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
string response = 2; // response is of jsonic format
|
|
|
|
string component_name = 3; // metrics from which component
|
|
|
|
}
|
|
|
|
|
2021-01-22 12:57:23 +08:00
|
|
|
service ProxyService {
|
2021-03-12 14:22:09 +08:00
|
|
|
rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
|
2021-09-18 11:13:51 +08:00
|
|
|
}
|