2020-10-24 18:04:57 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package milvus.proto.schema;
|
2021-04-22 14:45:57 +08:00
|
|
|
option go_package="github.com/milvus-io/milvus/internal/proto/schemapb";
|
2020-10-24 18:04:57 +08:00
|
|
|
|
|
|
|
import "common.proto";
|
2020-10-23 18:01:24 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Field data type
|
|
|
|
*/
|
|
|
|
enum DataType {
|
2021-03-12 14:22:09 +08:00
|
|
|
None = 0;
|
|
|
|
Bool = 1;
|
|
|
|
Int8 = 2;
|
|
|
|
Int16 = 3;
|
|
|
|
Int32 = 4;
|
|
|
|
Int64 = 5;
|
2020-10-23 18:01:24 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
Float = 10;
|
|
|
|
Double = 11;
|
2020-10-23 18:01:24 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
String = 20;
|
2020-10-23 18:01:24 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
BinaryVector = 100;
|
|
|
|
FloatVector = 101;
|
2020-10-23 18:01:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Field schema
|
|
|
|
*/
|
|
|
|
message FieldSchema {
|
2021-03-12 14:22:09 +08:00
|
|
|
int64 fieldID = 1;
|
|
|
|
string name = 2;
|
|
|
|
bool is_primary_key = 3;
|
|
|
|
string description = 4;
|
|
|
|
DataType data_type = 5;
|
|
|
|
repeated common.KeyValuePair type_params = 6;
|
|
|
|
repeated common.KeyValuePair index_params = 7;
|
2020-10-23 18:01:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Collection schema
|
|
|
|
*/
|
|
|
|
message CollectionSchema {
|
2021-03-12 14:22:09 +08:00
|
|
|
string name = 1;
|
|
|
|
string description = 2;
|
|
|
|
bool autoID = 3;
|
|
|
|
repeated FieldSchema fields = 4;
|
2020-10-28 10:09:35 +08:00
|
|
|
}
|