Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stencil): add support for search API #92

Merged
merged 3 commits into from
Feb 2, 2022
Merged
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
38 changes: 38 additions & 0 deletions odpf/stencil/v1beta1/stencil.proto
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ service StencilService {
summary: "Delete specified version of the schema";
};
}

rpc Search(SearchRequest) returns (SearchResponse) {
option (google.api.http) = {
get: "/v1beta1/search"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "schema";
summary: "Global Search API";
};
}
}

message Namespace {
Expand Down Expand Up @@ -295,3 +305,31 @@ message DeleteVersionRequest {
message DeleteVersionResponse {
string message = 1;
}

message SearchRequest {
string namespace_id = 1;
string schema_id = 2;
string query = 3;

oneof version {
bool history = 4;
int32 version_id = 5;
}
}

message SearchResponse {
repeated SearchHits hits = 1;
SearchMeta meta = 2;
}

message SearchHits {
string namespace_id = 1;
string schema_id = 2;
int32 version_id = 3;
repeated string fields = 4;
repeated string types = 5;
}

message SearchMeta {
uint32 total = 1;
}