Skip to content

Commit 9555e01

Browse files
authored
Separate GlobalParams into a separate message (opensearch-project#207)
* separate GlobalParams into a separate message Signed-off-by: Karen Xu <karenxyr@gmail.com> * Update CHANGELOG.md Signed-off-by: Karen X <karenxyr@gmail.com> * Update CHANGELOG.md Signed-off-by: Karen X <karenxyr@gmail.com> * renumber Signed-off-by: Karen X <karenxyr@gmail.com> --------- Signed-off-by: Karen Xu <karenxyr@gmail.com> Signed-off-by: Karen X <karenxyr@gmail.com>
1 parent f88e3c7 commit 9555e01

4 files changed

Lines changed: 15 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
88

99
### Changed
1010
- Modify `searchResponse` and `bulkResponse` according to the updated spec and remove the error response. ([#194](https://github.com/opensearch-project/opensearch-protobufs/pull/194))
11+
- Use separate `GlobalParams` message ([#207](https://github.com/opensearch-project/opensearch-protobufs/pull/207))
1112

1213
### Removed
1314

protos/schemas/common.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ option go_package = "github.com/opensearch-project/opensearch-protobufs/go/opens
1010

1111
import "google/protobuf/struct.proto";
1212

13+
// TODO: not supported yet in server
14+
message GlobalParams {
15+
// [optional] Whether to return human-readable values for statistics.
16+
optional bool human = 1;
17+
// [optional] Whether to include the stack trace of returned errors.
18+
optional bool error_trace = 2;
19+
// [optional] 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 `-`.
20+
repeated string filter_path = 3;
21+
}
22+
1323
message WaitForActiveShards {
1424

1525
oneof wait_for_active_shards {

protos/schemas/document.proto

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,8 @@ message BulkRequest {
4040
optional WaitForActiveShards wait_for_active_shards = 11;
4141
// [required] The request body contains create, delete, index, and update actions and their associated source data
4242
repeated BulkRequestBody request_body = 12;
43-
// [optional] Whether to return human-readable values for statistics.
44-
optional bool human = 13;
45-
// [optional] Whether to include the stack trace of returned errors.
46-
// TODO not supported yet
47-
optional bool error_trace = 14;
48-
// [optional] The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
49-
optional string source = 15;
50-
// [optional] 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 `-`.
51-
repeated string filter_path = 16;
43+
// [optional] Global parameters
44+
optional GlobalParams global_params = 13;
5245
}
5346

5447
message BulkRequestBody {

protos/schemas/search.proto

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,8 @@ message SearchRequest {
135135
optional bool version = 48;
136136
// [optional] Search Request body
137137
SearchRequestBody request_body = 49;
138-
// [optional] Whether to return human-readable values for statistics.
139-
optional bool human = 50;
140-
// [optional] Whether to include the stack trace of returned errors.
141-
// todo: not supported yet.
142-
optional bool error_trace = 52;
143-
// [optional] The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
144-
optional string source = 53;
145-
// [optional] 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 `-`.
146-
repeated string filter_path = 54;
138+
// [optional] Global parameters
139+
optional GlobalParams global_params = 50;
147140
}
148141

149142
message FloatMap {

0 commit comments

Comments
 (0)