aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/protobuf/search_protocol.proto
blob: 916788796b8f11fa0e4ac579f7134b00deff7359 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

syntax = "proto3";

package searchlib.searchprotocol.protobuf;

option java_package = "ai.vespa.searchlib.searchprotocol.protobuf";

message SearchRequest {
    int32 offset = 1;
    int32 hits = 2;
    int32 timeout = 3; // milliseconds
    int32 trace_level = 4;
    repeated SortField sorting = 5;
    string session_key = 6;
    string document_type = 7;
    bool cache_grouping = 8;
    bool cache_query = 9;
    string rank_profile = 10;
    repeated StringProperty feature_overrides = 11;
    repeated TensorProperty tensor_feature_overrides = 12;
    repeated StringProperty rank_properties = 13;
    repeated TensorProperty tensor_rank_properties = 14;
    bytes grouping_blob = 15;   // serialized opaquely like now, to be changed later
    string geo_location = 16; // to be moved into query_tree
    bytes query_tree_blob = 17; // serialized opaquely like now, to be changed later
    int32 profile_depth = 18; // new meaning: default ProfilingParams.depth
    Profiling profiling = 19;
}

message Profiling {
    ProfilingParams match = 1;
    ProfilingParams first_phase = 2;
    ProfilingParams second_phase = 3;
}

message ProfilingParams {
    int32 depth = 1;
}

message TensorProperty {
    string name = 1;
    bytes value = 2;
}

message StringProperty {
    string name = 1;
    repeated string values = 2;
}

message SortField {
    bool ascending = 1;
    string field = 2;
}

message SearchReply {
    int64 total_hit_count = 1;
    int64 coverage_docs = 2;
    int64 active_docs = 3;
    int64 target_active_docs = 4;
    bool degraded_by_match_phase = 5;
    bool degraded_by_soft_timeout = 6;
    repeated Hit hits = 7;
    bytes grouping_blob = 8; // serialized opaquely like now, to be changed later
    bytes slime_trace = 9;
    repeated Error errors = 10;
    repeated string match_feature_names = 11;
}

message Error {
    string message = 1;
}

message Hit {
    bytes global_id = 1;
    double relevance = 2;
    bytes sort_data = 3;
    repeated Feature match_features = 4;
}

message Feature {
    double number = 1;
    bytes tensor = 2;
}

message DocsumRequest {
    int32 timeout = 1; // milliseconds
    string session_key = 2;
    string document_type = 3;
    string summary_class = 4;
    bool cache_query = 5;
    bool dump_features = 6;
    string rank_profile = 7;
    repeated StringProperty feature_overrides = 8;
    repeated TensorProperty tensor_feature_overrides = 9;
    repeated StringProperty rank_properties = 10;
    repeated TensorProperty tensor_rank_properties = 11;
    repeated StringProperty highlight_terms = 12;
    string geo_location = 13; // to be moved into query_tree
    bytes query_tree_blob = 14; // serialized opaquely like now, to be changed later
    repeated bytes global_ids = 15;
    repeated string fields = 16;
}

message DocsumReply {
    bytes slime_summaries = 1; // result array inside slime object
    repeated Error errors = 2;
}

message MonitorRequest {
}

message MonitorReply {
    bool online = 1;
    int64 active_docs = 2;
    int32 distribution_key = 3;
    bool is_blocking_writes = 4;
    int64 target_active_docs = 5;
}