2021-04-09 10:17:38 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
package nexus.meta_api.proto;
|
|
|
|
|
|
|
|
import "nexus/models/proto/typed_document.proto";
|
2022-09-02 17:44:56 +02:00
|
|
|
import "summa/proto/search_service.proto";
|
|
|
|
|
|
|
|
service Search {
|
|
|
|
rpc search (SearchRequest) returns (SearchResponse) {}
|
|
|
|
rpc meta_search (MetaSearchRequest) returns (MetaSearchResponse) {}
|
|
|
|
}
|
2021-04-09 10:17:38 +02:00
|
|
|
|
|
|
|
message ScoredDocument {
|
|
|
|
nexus.models.proto.TypedDocument typed_document = 1;
|
2022-09-02 17:44:56 +02:00
|
|
|
double score = 2;
|
2021-04-13 16:23:31 +02:00
|
|
|
uint32 position = 3;
|
2022-09-02 17:44:56 +02:00
|
|
|
map<string, summa.proto.Snippet> snippets = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MetaSearchRequest {
|
|
|
|
repeated string index_aliases = 1;
|
|
|
|
string query = 2;
|
|
|
|
map<string, float> languages = 3;
|
|
|
|
repeated summa.proto.Collector collectors = 4;
|
|
|
|
repeated string query_tags = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MetaSearchResponse {
|
|
|
|
repeated summa.proto.CollectorOutput collector_outputs = 1;
|
2021-04-09 10:17:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message SearchRequest {
|
2022-03-28 16:39:36 +02:00
|
|
|
repeated string index_aliases = 1;
|
2021-04-09 10:17:38 +02:00
|
|
|
string query = 2;
|
|
|
|
uint32 page = 3;
|
|
|
|
uint32 page_size = 4;
|
|
|
|
string language = 5;
|
2022-09-02 17:44:56 +02:00
|
|
|
repeated string query_tags = 6;
|
2021-04-09 10:17:38 +02:00
|
|
|
}
|
|
|
|
|
2021-05-03 13:54:43 +02:00
|
|
|
message SearchResponse {
|
|
|
|
repeated ScoredDocument scored_documents = 1;
|
|
|
|
bool has_next = 2;
|
2022-09-02 17:44:56 +02:00
|
|
|
uint32 count = 3;
|
|
|
|
string query_language = 4;
|
2021-04-09 10:17:38 +02:00
|
|
|
}
|