Skip to content

Commit 281c36f

Browse files
lucy66hwgithub-actions[bot]
authored andcommitted
Protobuf schema change detected
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 3e0e12d commit 281c36f

3 files changed

Lines changed: 160 additions & 0 deletions

File tree

protos/generated/models/aggregated_models.proto

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,6 +2177,14 @@ message ResponseItem {
21772177

21782178
optional int64 x_version = 12;
21792179
}
2180+
enum Result {
2181+
RESULT_UNSPECIFIED = 0;
2182+
RESULT_CREATED = 1;
2183+
RESULT_DELETED = 2;
2184+
RESULT_NOOP = 3;
2185+
RESULT_NOT_FOUND = 4;
2186+
RESULT_UPDATED = 5;
2187+
}
21802188
enum ScoreMode {
21812189
SCORE_MODE_UNSPECIFIED = 0;
21822190
SCORE_MODE_AVG = 1;
@@ -2805,6 +2813,29 @@ message WriteOperation {
28052813
// When `true`, require that all actions target an index alias rather than an index. Default is `false`.
28062814
optional bool require_alias = 5;
28072815
}
2816+
message WriteResponseBase {
2817+
Result result = 1;
2818+
2819+
optional bool forced_refresh = 2;
2820+
2821+
// The type of document or resource.
2822+
optional string x_type = 3;
2823+
2824+
// The unique identifier for a resource.
2825+
string x_id = 4;
2826+
2827+
string x_index = 5;
2828+
2829+
// The primary term of the document.
2830+
int64 x_primary_term = 6;
2831+
2832+
// The sequence number of the document.
2833+
int64 x_seq_no = 7;
2834+
2835+
ShardStatistics x_shards = 8;
2836+
2837+
int64 x_version = 9;
2838+
}
28082839
enum ZeroTermsQuery {
28092840
ZERO_TERMS_QUERY_UNSPECIFIED = 0;
28102841
ZERO_TERMS_QUERY_ALL = 1;

protos/generated/services/default_service.proto

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ option java_multiple_files = true;
1212
option java_outer_classname = "CommonProto";
1313
option java_package = "org.opensearch.protobufs";
1414

15+
service DefaultService {
16+
rpc Bulk(BulkRequest) returns (BulkResponse);
17+
18+
rpc Index(IndexRequest) returns (WriteResponseBase);
19+
20+
rpc Search(SearchRequest) returns (SearchResponse);
21+
}
22+
1523
message BulkRequest {
1624
repeated BulkRequestBody bulk_request_body = 1;
1725

@@ -52,6 +60,49 @@ message BulkRequest {
5260
optional GlobalParams global_params = 13;
5361
}
5462

63+
message IndexRequest {
64+
// Name of the data stream or index to target.
65+
string index = 1;
66+
67+
ObjectMap body = 2;
68+
69+
// Only perform the operation if the document has this primary term.
70+
optional int64 if_primary_term = 3;
71+
72+
// Only perform the operation if the document has this sequence number.
73+
optional int64 if_seq_no = 4;
74+
75+
// Set to create to only index the document if it does not already exist (put if absent). If a document with the specified `_id` already exists, the indexing operation will fail. Same as using the `<index>/_create` endpoint. Valid values: `index`, `create`. If document id is specified, it defaults to `index`. Otherwise, it defaults to `create`.
76+
optional OpType op_type = 5;
77+
78+
// 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.
79+
optional string pipeline = 6;
80+
81+
// 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`.
82+
optional Refresh refresh = 7;
83+
84+
// If `true`, the destination must be an index alias.
85+
optional bool require_alias = 8;
86+
87+
// A custom value used to route operations to a specific shard.
88+
repeated string routing = 9;
89+
90+
// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
91+
optional string timeout = 10;
92+
93+
// Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
94+
optional int64 version = 11;
95+
96+
// The specific version type: `external`, `external_gte`.
97+
optional VersionType version_type = 12;
98+
99+
// 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`).
100+
optional WaitForActiveShards wait_for_active_shards = 13;
101+
102+
// Global query parameters
103+
optional GlobalParams global_params = 14;
104+
}
105+
55106
message SearchRequest {
56107
// 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).
57108
optional SourceConfigParam x_source = 1;

protos/schemas/common.proto

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3148,6 +3148,75 @@ message FieldValueFactorScoreFunction {
31483148
optional FieldValueFactorModifier modifier = 4;
31493149
}
31503150

3151+
message WriteResponseBase {
3152+
3153+
Result result = 1;
3154+
3155+
optional bool forced_refresh = 2;
3156+
3157+
// The type of document or resource.
3158+
optional string x_type = 3;
3159+
3160+
// The unique identifier for a resource.
3161+
string x_id = 4;
3162+
3163+
string x_index = 5;
3164+
3165+
// The primary term of the document.
3166+
int64 x_primary_term = 6;
3167+
3168+
// The sequence number of the document.
3169+
int64 x_seq_no = 7;
3170+
3171+
ShardStatistics x_shards = 8;
3172+
3173+
int64 x_version = 9;
3174+
}
3175+
3176+
message IndexRequest {
3177+
3178+
// Name of the data stream or index to target.
3179+
string index = 1;
3180+
3181+
ObjectMap body = 2;
3182+
3183+
// Only perform the operation if the document has this primary term.
3184+
optional int64 if_primary_term = 3;
3185+
3186+
// Only perform the operation if the document has this sequence number.
3187+
optional int64 if_seq_no = 4;
3188+
3189+
// Set to create to only index the document if it does not already exist (put if absent). If a document with the specified `_id` already exists, the indexing operation will fail. Same as using the `<index>/_create` endpoint. Valid values: `index`, `create`. If document id is specified, it defaults to `index`. Otherwise, it defaults to `create`.
3190+
optional OpType op_type = 5;
3191+
3192+
// 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.
3193+
optional string pipeline = 6;
3194+
3195+
// 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`.
3196+
optional Refresh refresh = 7;
3197+
3198+
// If `true`, the destination must be an index alias.
3199+
optional bool require_alias = 8;
3200+
3201+
// A custom value used to route operations to a specific shard.
3202+
repeated string routing = 9;
3203+
3204+
// Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
3205+
optional string timeout = 10;
3206+
3207+
// Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
3208+
optional int64 version = 11;
3209+
3210+
// The specific version type: `external`, `external_gte`.
3211+
optional VersionType version_type = 12;
3212+
3213+
// 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`).
3214+
optional WaitForActiveShards wait_for_active_shards = 13;
3215+
3216+
// Global query parameters
3217+
optional GlobalParams global_params = 14;
3218+
}
3219+
31513220
enum FieldValueFactorModifier {
31523221
FIELD_VALUE_FACTOR_MODIFIER_UNSPECIFIED = 0;
31533222
FIELD_VALUE_FACTOR_MODIFIER_LN = 1;
@@ -3483,6 +3552,15 @@ enum GeoExecution {
34833552
GEO_EXECUTION_MEMORY = 2;
34843553
}
34853554

3555+
enum Result {
3556+
RESULT_UNSPECIFIED = 0;
3557+
RESULT_CREATED = 1;
3558+
RESULT_DELETED = 2;
3559+
RESULT_NOOP = 3;
3560+
RESULT_NOT_FOUND = 4;
3561+
RESULT_UPDATED = 5;
3562+
}
3563+
34863564
message ObjectMap {
34873565
map<string, Value> fields = 1;
34883566

0 commit comments

Comments
 (0)