mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 05:18:52 +08:00
9a90313390
Signed-off-by: fluorinedog <fluorinedog@gmail.com>
99 lines
1.6 KiB
Protocol Buffer
99 lines
1.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
package milvus.proto.plan;
|
|
|
|
option go_package = "github.com/milvus-io/milvus/internal/proto/planpb";
|
|
import "schema.proto";
|
|
|
|
message GenericValue {
|
|
oneof val {
|
|
bool bool_val = 1;
|
|
int64 int64_val = 2;
|
|
double float_val = 3;
|
|
};
|
|
}
|
|
|
|
|
|
message QueryInfo {
|
|
int64 topk = 1;
|
|
string metric_type = 3;
|
|
string search_params = 4;
|
|
}
|
|
|
|
message ColumnInfo {
|
|
int64 field_id = 1;
|
|
schema.DataType data_type = 2;
|
|
}
|
|
|
|
message RangeExpr {
|
|
ColumnInfo column_info = 1;
|
|
enum OpType {
|
|
Invalid = 0;
|
|
GreaterThan = 1;
|
|
GreaterEqual = 2;
|
|
LessThan = 3;
|
|
LessEqual = 4;
|
|
Equal = 5;
|
|
NotEqual = 6;
|
|
};
|
|
repeated OpType ops = 2;
|
|
repeated GenericValue values = 3;
|
|
}
|
|
|
|
message TermExpr {
|
|
ColumnInfo column_info = 1;
|
|
repeated GenericValue values = 2;
|
|
}
|
|
|
|
message UnaryExpr {
|
|
enum UnaryOp{
|
|
Invalid = 0;
|
|
Not = 1;
|
|
};
|
|
UnaryOp op = 1;
|
|
Expr child = 2;
|
|
}
|
|
|
|
message BinaryExpr {
|
|
enum BinaryOp {
|
|
Invalid = 0;
|
|
LogicalAnd = 1;
|
|
LogicalOr = 2;
|
|
}
|
|
BinaryOp op = 1;
|
|
Expr left = 2;
|
|
Expr right = 3;
|
|
}
|
|
|
|
message Expr {
|
|
oneof expr {
|
|
RangeExpr range_expr = 1;
|
|
TermExpr term_expr = 2;
|
|
UnaryExpr unary_expr = 3;
|
|
BinaryExpr binary_expr = 4;
|
|
};
|
|
}
|
|
|
|
message VectorANNS {
|
|
bool is_binary = 1;
|
|
int64 field_id = 2;
|
|
Expr predicates = 3;
|
|
QueryInfo query_info = 4;
|
|
string placeholder_tag = 5; // always be "$0"
|
|
}
|
|
|
|
message PlanNode {
|
|
oneof node {
|
|
VectorANNS vector_anns = 1;
|
|
}
|
|
}
|
|
|
|
message RetrieveRequest {
|
|
schema.IDs ids = 1;
|
|
repeated string output_fields = 2;
|
|
}
|
|
|
|
message RetrieveResults {
|
|
schema.IDs ids = 1;
|
|
repeated schema.FieldData fields_data = 2;
|
|
}
|