forked from opensearch-project/opensearch-protobufs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault_service.proto
More file actions
189 lines (130 loc) · 11.4 KB
/
Copy pathdefault_service.proto
File metadata and controls
189 lines (130 loc) · 11.4 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/*
This is auto generated by OpenAPI Generator. The source of OpenAPI is opensearch-api-specification
*/
syntax = "proto3";
package org.opensearch.protobufs.services;
import "models/aggregated_models.proto";
message BulkRequest {
// Name of the data stream, index, or index alias to perform bulk actions on.
string index = 1;
repeated BulkRequestInner bulk_request_inner = 2;
// `true` or `false` to return the `_source` field or not, or a list of fields to return.
optional SourceConfigParam x_source = 3;
// A comma-separated list of source fields to exclude from the response.
repeated string x_source_excludes = 4;
// A comma-separated list of source fields to include in the response.
repeated string x_source_includes = 5;
// ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
optional string pipeline = 6;
// If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
optional Refresh refresh = 7;
// If `true`, the request's actions must target an index alias.
optional bool require_alias = 8;
// A custom value used to route operations to a specific shard.
optional string routing = 9;
// Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
optional string timeout = 10;
// Default document type for items which don't provide one.
optional string type = 11;
// The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
optional WaitForActiveShards wait_for_active_shards = 12;
// Whether to pretty-format the returned JSON response.
optional bool pretty = 13;
// Whether to return human-readable values for statistics.
optional bool human = 14;
// Whether to include the stack trace of returned errors.
optional bool error_trace = 15;
// The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
optional string source = 16;
// A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
repeated string filter_path = 17;
}
message BulkResponse {
oneof response {
BulkResponseBase bulk_response_base_200 = 1;
}
}
message SearchRequest {
// A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`.
repeated string index = 1;
// Indicates which source fields are returned for matching documents. These fields are returned in the `hits._source` property of the search response. Valid values are: `true` to return the entire document source; `false` to not return the document source; `<string>` to return the source fields that are specified as a comma-separated list (supports wildcard (`*`) patterns).
optional SourceConfigParam x_source = 2;
// A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. If the `_source` parameter is `false`, this parameter is ignored.
repeated string x_source_excludes = 3;
// A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored.
repeated string x_source_includes = 4;
// If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
optional bool allow_no_indices = 5;
// If `true`, returns partial results if there are shard request timeouts or shard failures. If `false`, returns an error with no partial results.
optional bool allow_partial_search_results = 6;
// If `true`, wildcard and prefix queries are analyzed. This parameter can only be used when the q query string parameter is specified.
optional bool analyze_wildcard = 7;
// The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
optional int32 batched_reduce_size = 8;
// The time after which the search request will be canceled. Request-level parameter takes precedence over `cancel_after_time_interval` cluster setting.
optional string cancel_after_time_interval = 9;
// If `true`, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests.
optional bool ccs_minimize_roundtrips = 10;
// The default operator for query string query: AND or OR. This parameter can only be used when the `q` query string parameter is specified.
optional Operator default_operator = 11;
// Field to use as default where no field prefix is given in the query string. This parameter can only be used when the q query string parameter is specified.
optional string df = 12;
// A comma-separated list of fields to return as the docvalue representation for each hit.
repeated string docvalue_fields = 13;
// Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`.
repeated ExpandWildcard expand_wildcards = 14;
// If `true`, concrete, expanded or aliased indexes will be ignored when frozen.
optional bool ignore_throttled = 15;
// If `false`, the request returns an error if it targets a missing or closed index.
optional bool ignore_unavailable = 16;
// Defines the number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.
optional int32 max_concurrent_shard_requests = 17;
// Indicates whether to return phase-level `took` time values in the response.
optional bool phase_took = 18;
// Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). When unspecified, the pre-filter phase is executed if any of these conditions is met: the request targets more than 128 shards; the request targets one or more read-only index; the primary sort of the query targets an indexed field.
optional int32 pre_filter_shard_size = 19;
// Nodes and shards used for the search. By default, OpenSearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: `_only_local` to run the search only on shards on the local node; `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method; `_only_nodes:<node-id>,<node-id>` to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; `_prefer_nodes:<node-id>,<node-id>` to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; `_shards:<shard>,<shard>` to run the search only on the specified shards; `<custom-string>` (any string that does not start with `_`) to route searches with the same `<custom-string>` to the same shards in the same order.
optional string preference = 20;
// Query in the Lucene query string syntax using query parameter search. Query parameter searches do not support the full OpenSearch Query DSL but are handy for testing.
optional string q = 21;
// If `true`, the caching of search results is enabled for requests where `size` is `0`. Defaults to index level settings.
optional bool request_cache = 22;
// Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response.
optional bool rest_total_hits_as_int = 23;
// A custom value used to route operations to a specific shard.
repeated string routing = 24;
// Period to retain the search context for scrolling. See Scroll search results. By default, this value cannot exceed `1d` (24 hours). You can change this limit using the `search.max_keep_alive` cluster-level setting.
optional string scroll = 25;
// Customizable sequence of processing stages applied to search queries.
optional string search_pipeline = 26;
// How distributed term frequencies are calculated for relevance scoring.
optional SearchType search_type = 27;
// Specifies which field to use for suggestions.
optional string suggest_field = 28;
// Specifies the suggest mode. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
optional SuggestMode suggest_mode = 29;
// Number of suggestions to return. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
optional int32 suggest_size = 30;
// The source text for which the suggestions should be returned. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified.
optional string suggest_text = 31;
// If `true`, aggregation and suggester names are be prefixed by their respective types in the response.
optional bool typed_keys = 32;
// Whether to pretty-format the returned JSON response.
optional bool pretty = 33;
// Whether to return human-readable values for statistics.
optional bool human = 34;
// Whether to include the stack trace of returned errors.
optional bool error_trace = 35;
// The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
optional string source = 36;
// A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
repeated string filter_path = 37;
optional SearchRequest search_request = 38;
}
message SearchResponse {
oneof response {
SearchResponse search_response_200 = 1;
ErrorResponseBase error_response_base_400 = 2;
ErrorResponseBase error_response_base_404 = 3;
}
}