-
Notifications
You must be signed in to change notification settings - Fork 13
/
test.proto
31 lines (29 loc) · 1.09 KB
/
test.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Test message.
// This message sends a search request.
message SearchRequest {
required string query = 1; // Query string used in search request.
optional int32 page_number = 2; // Page number.
optional int32 result_per_page = 3 [default = 10]; // Number of results per page. The default is 10.
// Corpus (type) of the search request.
enum Corpus {
UNIVERSAL = 0; // Universal, i.e. typeless search
WEB = 1; // Web search
IMAGES = 2; // Image search
LOCAL = 3; // Local search
NEWS = 4; // News search
PRODUCTS = 5; // Product search
VIDEO = 6; // Video search
}
optional Corpus corpus = 4 [default = UNIVERSAL]; // Corpus (type) of the search. The default is 'UNIVERSAL'.
}
// Another test message.
// This message sends a search response.
message SearchResponse {
// This message contains actual result of the search response.
message Result {
required string url = 1; // Page (result) URL.
optional string title = 2; // Page title.
repeated string snippets = 3; // Some snippets from the page.
}
repeated Result result = 1; // Search results.
}