2020-10-24 10:04:57 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package milvus.proto.service;
|
|
|
|
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/servicepb";
|
|
|
|
|
|
|
|
import "common.proto";
|
|
|
|
import "schema.proto";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Collection name
|
|
|
|
*/
|
|
|
|
message CollectionName {
|
|
|
|
string collection_name = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Partition name
|
|
|
|
*/
|
|
|
|
message PartitionName {
|
|
|
|
string collection_name = 1;
|
|
|
|
string tag = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Row batch for Insert call
|
|
|
|
*/
|
|
|
|
message RowBatch {
|
|
|
|
string collection_name = 1;
|
|
|
|
string partition_tag = 2;
|
|
|
|
repeated common.Blob row_data = 3;
|
2020-10-31 07:11:47 +00:00
|
|
|
repeated int32 hash_keys = 4;
|
2020-10-24 10:04:57 +00:00
|
|
|
}
|
|
|
|
|
2020-11-02 08:01:04 +00:00
|
|
|
/**
|
|
|
|
* @brief Placeholder value types
|
|
|
|
*/
|
|
|
|
enum PlaceholderType {
|
|
|
|
NONE = 0;
|
|
|
|
VECTOR_BINARY = 100;
|
|
|
|
VECTOR_FLOAT = 101;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-10-24 10:04:57 +00:00
|
|
|
/**
|
2020-11-02 08:01:04 +00:00
|
|
|
* @brief Placeholder value in DSL
|
|
|
|
*/
|
2020-10-24 10:04:57 +00:00
|
|
|
message PlaceholderValue {
|
|
|
|
string tag = 1;
|
2020-11-02 08:01:04 +00:00
|
|
|
PlaceholderType type = 2;
|
2020-11-12 04:18:07 +00:00
|
|
|
// values is a 2d-array, every array contains a vector
|
|
|
|
repeated bytes values = 3;
|
|
|
|
|
2020-10-24 10:04:57 +00:00
|
|
|
}
|
|
|
|
|
2020-11-09 08:27:11 +00:00
|
|
|
message PlaceholderGroup {
|
|
|
|
repeated PlaceholderValue placeholders = 1;
|
|
|
|
}
|
2020-10-24 10:04:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Query for Search call
|
|
|
|
*/
|
|
|
|
message Query {
|
|
|
|
string collection_name = 1;
|
|
|
|
repeated string partition_tags = 2;
|
|
|
|
string dsl = 3;
|
2020-11-12 04:18:07 +00:00
|
|
|
// placeholder_group contains the serialized PlaceholderGroup
|
2020-11-09 08:27:11 +00:00
|
|
|
bytes placeholder_group = 4;
|
2020-10-24 10:04:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief String response
|
|
|
|
*/
|
|
|
|
message StringResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
string value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Bool response
|
|
|
|
*/
|
|
|
|
message BoolResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
bool value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief String list response
|
|
|
|
*/
|
|
|
|
message StringListResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
repeated string values = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Integer list response
|
|
|
|
*/
|
|
|
|
message IntegerListResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
repeated int64 values = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Range response, [begin, end)
|
|
|
|
*/
|
|
|
|
message IntegerRangeResponse {
|
|
|
|
common.Status status = 1;
|
2020-10-31 07:11:47 +00:00
|
|
|
int64 begin = 2;
|
|
|
|
int64 end = 3;
|
2020-10-24 10:04:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Response of DescribeCollection
|
|
|
|
*/
|
|
|
|
message CollectionDescription {
|
|
|
|
common.Status status = 1;
|
|
|
|
schema.CollectionSchema schema = 2;
|
|
|
|
repeated common.KeyValuePair statistics = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Response of DescribePartition
|
|
|
|
*/
|
|
|
|
message PartitionDescription {
|
|
|
|
common.Status status = 1;
|
|
|
|
PartitionName name = 2;
|
|
|
|
repeated common.KeyValuePair statistics = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Entities hit by query
|
|
|
|
*/
|
|
|
|
message Hits {
|
2020-11-13 07:17:18 +00:00
|
|
|
repeated int64 IDs = 1;
|
2020-11-26 03:12:33 +00:00
|
|
|
repeated bytes row_data = 2;
|
|
|
|
repeated float scores = 3;
|
2020-10-24 10:04:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Query result
|
|
|
|
*/
|
|
|
|
message QueryResult {
|
|
|
|
common.Status status = 1;
|
2020-11-26 03:12:33 +00:00
|
|
|
repeated bytes hits = 2;
|
2020-10-24 10:04:57 +00:00
|
|
|
}
|
|
|
|
|