123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568 |
- syntax = "proto3";
- import "status.proto";
- option java_multiple_files = true;
- option java_package = "io.milvus.grpc";
- option java_outer_classname = "MilvusProto";
- package milvus.grpc;
- /**
- * @brief Table Name
- */
- message TableName {
- string table_name = 1;
- }
- /**
- * @brief Table Name List
- */
- message TableNameList {
- Status status = 1;
- repeated string table_names = 2;
- }
- /**
- * @brief Table Schema
- */
- message TableSchema {
- Status status = 1;
- string table_name = 2;
- int64 dimension = 3;
- int64 index_file_size = 4;
- int32 metric_type = 5;
- }
- /**
- * @brief Range Schema
- */
- message Range {
- string start_value = 1;
- string end_value = 2;
- }
- /**
- * @brief Record inserted
- */
- message RowRecord {
- repeated float vector_data = 1; //binary vector data
- }
- /**
- * @brief params to be inserted
- */
- message InsertParam {
- string table_name = 1;
- repeated RowRecord row_record_array = 2;
- repeated int64 row_id_array = 3; //optional
- }
- /**
- * @brief Vector ids
- */
- message VectorIds {
- Status status = 1;
- repeated int64 vector_id_array = 2;
- }
- /**
- * @brief params for searching vector
- */
- message SearchParam {
- string table_name = 1;
- repeated RowRecord query_record_array = 2;
- repeated Range query_range_array = 3;
- int64 topk = 4;
- int64 nprobe = 5;
- }
- /**
- * @brief params for searching vector in files
- */
- message SearchInFilesParam {
- repeated string file_id_array = 1;
- SearchParam search_param = 2;
- }
- /**
- * @brief Query result params
- */
- message TopKQueryResult {
- Status status = 1;
- int64 row_num = 2;
- repeated int64 ids = 3;
- repeated float distances = 4;
- }
- /**
- * @brief Server String Reply
- */
- message StringReply {
- Status status = 1;
- string string_reply = 2;
- }
- /**
- * @brief Server bool Reply
- */
- message BoolReply {
- Status status = 1;
- bool bool_reply = 2;
- }
- /**
- * @brief Return table row count
- */
- message TableRowCount {
- Status status = 1;
- int64 table_row_count = 2;
- }
- /**
- * @brief Give Server Command
- */
- message Command {
- string cmd = 1;
- }
- /**
- * @brief Index
- * @index_type: 0-invalid, 1-idmap, 2-ivflat, 3-ivfsq8, 4-nsgmix
- * @metric_type: 1-L2, 2-IP
- */
- message Index {
- int32 index_type = 1;
- int32 nlist = 2;
- }
- /**
- * @brief Index params
- */
- message IndexParam {
- Status status = 1;
- string table_name = 2;
- Index index = 3;
- }
- /**
- * @brief table name and range for DeleteByRange
- */
- message DeleteByRangeParam {
- Range range = 1;
- string table_name = 2;
- }
- service MilvusService {
- /**
- * @brief Create table method
- *
- * This method is used to create table
- *
- * @param param, use to provide table information to be created.
- *
- */
- rpc CreateTable (TableSchema) returns (Status) {
- }
- /**
- * @brief Test table existence method
- *
- * This method is used to test table existence.
- *
- * @param table_name, table name is going to be tested.
- *
- */
- rpc HasTable (TableName) returns (BoolReply) {
- }
- /**
- * @brief Delete table method
- *
- * This method is used to delete table.
- *
- * @param table_name, table name is going to be deleted.
- *
- */
- rpc DropTable (TableName) returns (Status) {
- }
- /**
- * @brief Build index by table method
- *
- * This method is used to build index by table in sync mode.
- *
- * @param table_name, table is going to be built index.
- *
- */
- rpc CreateIndex (IndexParam) returns (Status) {
- }
- /**
- * @brief Add vector array to table
- *
- * This method is used to add vector array to table.
- *
- * @param table_name, table_name is inserted.
- * @param record_array, vector array is inserted.
- *
- * @return vector id array
- */
- rpc Insert (InsertParam) returns (VectorIds) {
- }
- /**
- * @brief Query vector
- *
- * This method is used to query vector in table.
- *
- * @param table_name, table_name is queried.
- * @param query_record_array, all vector are going to be queried.
- * @param query_range_array, optional ranges for conditional search. If not specified, search whole table
- * @param topk, how many similarity vectors will be searched.
- *
- * @return query result array.
- */
- rpc Search (SearchParam) returns (TopKQueryResult) {
- }
- /**
- * @brief Internal use query interface
- *
- * This method is used to query vector in specified files.
- *
- * @param file_id_array, specified files id array, queried.
- * @param query_record_array, all vector are going to be queried.
- * @param query_range_array, optional ranges for conditional search. If not specified, search whole table
- * @param topk, how many similarity vectors will be searched.
- *
- * @return query result array.
- */
- rpc SearchInFiles (SearchInFilesParam) returns (TopKQueryResult) {
- }
- /**
- * @brief Get table schema
- *
- * This method is used to get table schema.
- *
- * @param table_name, target table name.
- *
- * @return table schema
- */
- rpc DescribeTable (TableName) returns (TableSchema) {
- }
- /**
- * @brief Get table schema
- *
- * This method is used to get table schema.
- *
- * @param table_name, target table name.
- *
- * @return table schema
- */
- rpc CountTable (TableName) returns (TableRowCount) {
- }
- /**
- * @brief List all tables in database
- *
- * This method is used to list all tables.
- *
- *
- * @return table names.
- */
- rpc ShowTables (Command) returns (TableNameList) {
- }
- /**
- * @brief Give the server status
- *
- * This method is used to give the server status.
- *
- * @return Server status.
- */
- rpc Cmd (Command) returns (StringReply) {
- }
- /**
- * @brief delete table by range
- *
- * This method is used to delete vector by range
- *
- * @return rpc status.
- */
- rpc DeleteByRange (DeleteByRangeParam) returns (Status) {
- }
- /**
- * @brief preload table
- *
- * This method is used to preload table
- *
- * @return Status.
- */
- rpc PreloadTable (TableName) returns (Status) {
- }
- /**
- * @brief describe index
- *
- * This method is used to describe index
- *
- * @return Status.
- */
- rpc DescribeIndex (TableName) returns (IndexParam) {
- }
- /**
- * @brief drop index
- *
- * This method is used to drop index
- *
- * @return Status.
- */
- rpc DropIndex (TableName) returns (Status) {
- }
- }
|