2020-10-24 18:04:57 +08: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 15:11:47 +08:00
|
|
|
repeated int32 hash_keys = 4;
|
2020-10-24 18:04:57 +08:00
|
|
|
}
|
|
|
|
|
2020-11-02 16:01:04 +08:00
|
|
|
/**
|
|
|
|
* @brief Placeholder value types
|
|
|
|
*/
|
|
|
|
enum PlaceholderType {
|
|
|
|
NONE = 0;
|
|
|
|
VECTOR_BINARY = 100;
|
|
|
|
VECTOR_FLOAT = 101;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message VectorValues {
|
|
|
|
repeated common.Blob value = 1;
|
|
|
|
}
|
|
|
|
|
2020-10-24 18:04:57 +08:00
|
|
|
|
|
|
|
/**
|
2020-11-02 16:01:04 +08:00
|
|
|
* @brief Placeholder value in DSL
|
|
|
|
*/
|
2020-10-24 18:04:57 +08:00
|
|
|
message PlaceholderValue {
|
|
|
|
string tag = 1;
|
2020-11-02 16:01:04 +08:00
|
|
|
PlaceholderType type = 2;
|
|
|
|
// value contains the serialized VectorValues
|
2020-11-09 16:27:11 +08:00
|
|
|
bytes value = 3;
|
2020-10-24 18:04:57 +08:00
|
|
|
}
|
|
|
|
|
2020-11-09 16:27:11 +08:00
|
|
|
message PlaceholderGroup {
|
|
|
|
repeated PlaceholderValue placeholders = 1;
|
|
|
|
}
|
2020-10-24 18:04:57 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Query for Search call
|
|
|
|
*/
|
|
|
|
message Query {
|
|
|
|
string collection_name = 1;
|
|
|
|
repeated string partition_tags = 2;
|
|
|
|
string dsl = 3;
|
2020-11-09 16:27:11 +08:00
|
|
|
bytes placeholder_group = 4;
|
2020-10-24 18:04:57 +08: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 15:11:47 +08:00
|
|
|
int64 begin = 2;
|
|
|
|
int64 end = 3;
|
2020-10-24 18:04:57 +08: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 Scores of a query.
|
|
|
|
* The default value of tag is "root".
|
|
|
|
* It corresponds to the final score of each hit.
|
|
|
|
*/
|
|
|
|
message Score {
|
|
|
|
string tag = 1;
|
|
|
|
repeated float values = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Entities hit by query
|
|
|
|
*/
|
|
|
|
message Hits {
|
|
|
|
repeated int64 ids = 1;
|
|
|
|
repeated common.Blob row_data = 2;
|
|
|
|
repeated Score scores = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Query result
|
|
|
|
*/
|
|
|
|
message QueryResult {
|
|
|
|
common.Status status = 1;
|
|
|
|
repeated Hits hits = 2;
|
|
|
|
}
|
|
|
|
|