Created
August 3, 2019 01:42
-
-
Save bsod90/46010b6b2fa4a468764440b93c0cbbee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
message TopKDocumentsRequest { | |
string query = 1; | |
int32 k = 2; | |
} | |
message DocumentsWithinDistanceRequest { | |
string query = 1; | |
double distance = 2; | |
} | |
message DocumentMatch { | |
int64 id = 1; | |
double distance = 2; | |
} | |
message SearchResponse { | |
enum Error { | |
NO_ERROR = 0; | |
INDEX_IS_NOT_READY = 1; | |
UNKNOWN_ERROR = 2; | |
} | |
repeated DocumentMatch matches = 1; | |
Error error = 2; | |
} | |
message SyncRequest { | |
oneof target { | |
int64 documentId = 1; | |
bool all = 2; | |
} | |
bool delete = 3; | |
} | |
message SyncResponse { | |
enum Error { | |
NO_ERROR = 0; | |
ANOTHER_SYNC_IN_PROGRESS = 1; | |
INDEX_IS_NOT_READY = 2; | |
UNKNOWN_ERROR = 3; | |
} | |
Error error = 1; | |
} | |
service Victor { | |
rpc FindTopKDocuments(TopKDocumentsRequest) returns (SearchResponse); | |
rpc FindDocumentsWithinDistance(DocumentsWithinDistanceRequest) returns (SearchResponse); | |
rpc Sync(SyncRequest) returns (SyncResponse); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment