Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions api/seqproxyapi/v1/seq_proxy_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ service SeqProxyApi {
body: "*"
};
}

rpc OnePhaseSearch(SearchRequest) returns (ComplexSearchResponse) {
option (google.api.http) = {
post: "/one-phase-search"
body: "*"
};
}
}

// Custom error code, returned by seq-db proxy.
Expand Down
64 changes: 62 additions & 2 deletions api/storeapi/store_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ service StoreApi {
rpc Fetch(FetchRequest) returns (stream BinaryData) {}

rpc Status(StatusRequest) returns (StatusResponse) {}

rpc OnePhaseSearch(OnePhaseSearchRequest) returns (stream OnePhaseSearchResponse) {}
}

message BulkRequest {
Expand Down Expand Up @@ -244,12 +246,13 @@ message IdWithHint {
string hint = 2;
}

message FetchRequest {
message FieldsFilter {
message FieldsFilter {
repeated string fields = 1;
// see seqproxyapi.FetchRequest.FieldsFilter.allow_list for details.
bool allow_list = 2;
}

message FetchRequest {
repeated string ids = 1;
bool explain = 3;
repeated IdWithHint ids_with_hints = 4;
Expand All @@ -261,3 +264,60 @@ message StatusRequest {}
message StatusResponse {
google.protobuf.Timestamp oldest_time = 1;
}

message OnePhaseSearchRequest {
string query = 1;
google.protobuf.Timestamp from = 2;
google.protobuf.Timestamp to = 3;
int64 size = 4;
int64 offset = 5;
bool explain = 6;
bool with_total = 7;
Order order = 8;
string offset_id = 9;
FieldsFilter fields_filter = 10;
}

message OnePhaseSearchResponse {
oneof ResponseType {
Header header = 1;
RecordsBatch batch = 2;
}
}

message Header {
Metadata metadata = 1;
repeated Typing typing = 2;
}

message Metadata {
uint64 total = 1;
SearchErrorCode code = 2;
repeated string errors = 3;
optional ExplainEntry explain = 4;
}

enum DataType {
BYTES = 0;
RAW_DOCUMENT = 1;
STRING = 2;
UINT32 = 3;
UINT64 = 4;
INT32 = 5;
INT64 = 6;
FLOAT64 = 7;
// TODO: array data types: StringArray, Uin64Array, Float64Array etc.
}

message Typing {
string title = 1;
DataType type = 2;
}

message RecordsBatch {
repeated Record records = 1;
}

message Record {
repeated bytes raw_data = 1;
}
Loading
Loading