Skip to content

Commit 7ad8de3

Browse files
authored
Rename underscore_ prefix with x_ (opensearch-project#177)
Signed-off-by: Karen Xu <karenxyr@gmail.com>
1 parent 36b4a04 commit 7ad8de3

4 files changed

Lines changed: 118 additions & 118 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
### Added
77

88
### Changed
9-
update `score` type. ([#176](https://github.com/opensearch-project/opensearch-protobufs/pull/176))
10-
9+
- update `score` type. ([#176](https://github.com/opensearch-project/opensearch-protobufs/pull/176))
10+
- Replace `underscore_` prefix with `x_` ([#177](https://github.com/opensearch-project/opensearch-protobufs/pull/177))
1111
### Removed
1212

1313
### Fixed

protos/schemas/common.proto

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ message TermsQuery {
464464
optional float boost = 1;
465465

466466
// [optional] Query name for query tagging.
467-
optional string underscore_name = 2;
467+
optional string x_name = 2;
468468

469469
// [optional] Specifies the types of values used for filtering. Valid values are `default` and `bitmap`. Default is `default`.
470470
optional TermsQueryValueType value_type = 3;
@@ -479,7 +479,7 @@ message NestedQuery {
479479
optional float boost = 1;
480480

481481
// [optional] Query name for query tagging.
482-
optional string underscore_name = 2;
482+
optional string x_name = 2;
483483

484484
// Set to `true` to ignore an unmapped field and not match any documents for this query. Set to `false` to throw an exception if the field is not mapped.
485485
bool ignore_unmapped = 3;
@@ -542,7 +542,7 @@ message InnerHits {
542542
repeated SortOptions sort = 12;
543543

544544
// [optional] Select what fields of the source are returned
545-
optional SourceConfig underscore_source = 13;
545+
optional SourceConfig x_source = 13;
546546

547547
// [optional] A list of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this option is specified, the _source parameter defaults to false. You can pass _source: true to return both source fields and stored fields in the search response.
548548
repeated string stored_fields = 14;
@@ -857,13 +857,13 @@ enum FieldType {
857857

858858
message SortOptionsOneOf {
859859
// [optional]
860-
optional ScoreSort underscore_score = 1;
860+
optional ScoreSort x_score = 1;
861861
// [optional]
862-
optional ScoreSort underscore_doc = 2;
862+
optional ScoreSort x_doc = 2;
863863
// [optional]
864-
optional GeoDistanceSort underscore_geo_distance = 3;
864+
optional GeoDistanceSort x_geo_distance = 3;
865865
// [optional]
866-
optional ScriptSort underscore_script = 4;
866+
optional ScriptSort x_script = 4;
867867
}
868868

869869
message ScoreSort {
@@ -1008,7 +1008,7 @@ message ScriptScoreQuery {
10081008
optional float boost = 1;
10091009

10101010
// [optional] Query name for query tagging.
1011-
optional string underscore_name = 2;
1011+
optional string x_name = 2;
10121012

10131013
// Documents with a score lower than this floating point number are excluded from the search results.
10141014
float min_score = 3;
@@ -1027,7 +1027,7 @@ message ExistsQuery {
10271027
optional float boost = 2;
10281028

10291029
// [optional] Query name for query tagging.
1030-
optional string underscore_name = 3;
1030+
optional string x_name = 3;
10311031
}
10321032

10331033
enum Operator {
@@ -1042,7 +1042,7 @@ message SimpleQueryStringQuery {
10421042
optional float boost = 1;
10431043

10441044
// [optional] Query name for query tagging.
1045-
optional string underscore_name = 2;
1045+
optional string x_name = 2;
10461046

10471047
// Analyzer used to convert text in the query string into tokens.
10481048
string analyzer = 3;
@@ -1088,7 +1088,7 @@ message WildcardQuery {
10881088
optional float boost = 2;
10891089

10901090
// [optional] The name of the query for query tagging.
1091-
optional string underscore_name = 3;
1091+
optional string x_name = 3;
10921092

10931093
// [optional] Allows case insensitive matching of the pattern with the indexed field values when set to `true`. Default is `false` which means the case sensitivity of matching depends on the underlying field's mapping.
10941094
optional bool case_insensitive = 4;
@@ -1166,7 +1166,7 @@ message KnnQuery {
11661166
optional float boost = 7;
11671167

11681168
// [optional] Query name for query tagging.
1169-
optional string underscore_name = 8;
1169+
optional string x_name = 8;
11701170

11711171
// [optional]
11721172
// Method parameters are dependent on the combination of engine and method used to create the index.
@@ -1211,7 +1211,7 @@ message MatchQuery {
12111211
optional float boost = 1;
12121212

12131213
// [optional] Query name for query tagging.
1214-
optional string underscore_name = 2;
1214+
optional string x_name = 2;
12151215

12161216
// [optional]
12171217
// The analyzer used to tokenize the query string text.
@@ -1327,7 +1327,7 @@ message BoolQuery {
13271327
optional float boost = 1;
13281328

13291329
// [optional] The name of the query for query tagging.
1330-
optional string underscore_name = 2;
1330+
optional string x_name = 2;
13311331

13321332
// [optional] The clause (query) must appear in matching documents. However, unlike `must`, the score of the query will be ignored.
13331333
repeated QueryContainer filter = 3;
@@ -1363,7 +1363,7 @@ message BoostingQuery {
13631363
optional float boost = 1;
13641364

13651365
// [optional] Query name for query tagging.
1366-
optional string underscore_name = 2;
1366+
optional string x_name = 2;
13671367

13681368
// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query.
13691369
float negative_boost = 3;
@@ -1380,7 +1380,7 @@ message ConstantScoreQuery {
13801380
optional float boost = 1;
13811381

13821382
// [optional] Query name for query tagging.
1383-
optional string underscore_name = 2;
1383+
optional string x_name = 2;
13841384

13851385
QueryContainer filter = 3;
13861386

@@ -1392,7 +1392,7 @@ message DisMaxQuery {
13921392
optional float boost = 1;
13931393

13941394
// [optional] Query name for query tagging.
1395-
optional string underscore_name = 2;
1395+
optional string x_name = 2;
13961396

13971397
// One or more query clauses. Returned documents must match one or more of these queries. If a document matches multiple queries, OpenSearch uses the highest relevance score.
13981398
repeated QueryContainer queries = 3;
@@ -1408,7 +1408,7 @@ message FunctionScoreQuery {
14081408
optional float boost = 1;
14091409

14101410
// [optional] Query name for query tagging.
1411-
optional string underscore_name = 2;
1411+
optional string x_name = 2;
14121412

14131413
FunctionBoostMode boost_mode = 3;
14141414

@@ -1500,7 +1500,7 @@ message IntervalsQuery {
15001500
optional float boost = 2;
15011501

15021502
// [optional] Query name for query tagging.
1503-
optional string underscore_name = 3;
1503+
optional string x_name = 3;
15041504

15051505
oneof intervals_query {
15061506
IntervalsAllOf all_of = 4;
@@ -1597,7 +1597,7 @@ message PrefixQuery {
15971597
optional float boost = 2;
15981598

15991599
// [optional] Query name for query tagging.
1600-
optional string underscore_name = 3;
1600+
optional string x_name = 3;
16011601

16021602
// [optional]
16031603
// Determines how OpenSearch rewrites the query.
@@ -1713,7 +1713,7 @@ message TermsSetQuery {
17131713
optional float boost = 2;
17141714

17151715
// [optional] Query name for query tagging.
1716-
optional string underscore_name = 3;
1716+
optional string x_name = 3;
17171717

17181718
// [optional]
17191719
// The name of the numeric field that specifies the number of matching terms required in order to return a document in the results.
@@ -1737,7 +1737,7 @@ message TermQuery {
17371737
optional float boost = 2;
17381738

17391739
// [optional] Query name for query tagging.
1740-
optional string underscore_name = 3;
1740+
optional string x_name = 3;
17411741

17421742
// [required]
17431743
// Term you wish to find in the provided <field>. To return a document, the term must exactly match the field value, including whitespace and capitalization.
@@ -1755,7 +1755,7 @@ message QueryStringQuery {
17551755
optional float boost = 1;
17561756

17571757
// [optional] Query name for query tagging.
1758-
optional string underscore_name = 2;
1758+
optional string x_name = 2;
17591759

17601760
bool allow_leading_wildcard = 3;
17611761

@@ -1878,7 +1878,7 @@ message RegexpQuery {
18781878
optional float boost = 3;
18791879

18801880
// [optional] Query name for query tagging
1881-
optional string underscore_name = 4;
1881+
optional string x_name = 4;
18821882

18831883
// [optional] If true, allows case-insensitive matching of the regular expression value with the indexed field values. Default is false (case sensitivity is determined by the field’s mapping).
18841884
optional bool case_insensitive = 5;
@@ -1908,7 +1908,7 @@ message DateRangeQuery {
19081908
optional float boost = 1;
19091909

19101910
// [optional] Query name for query tagging.
1911-
optional string underscore_name = 2;
1911+
optional string x_name = 2;
19121912

19131913
RangeRelation relation = 3;
19141914
enum RangeRelation {
@@ -1955,7 +1955,7 @@ message NumberRangeQuery {
19551955
optional float boost = 1;
19561956

19571957
// [optional] Query name for query tagging.
1958-
optional string underscore_name = 2;
1958+
optional string x_name = 2;
19591959

19601960
RangeRelation relation = 3;
19611961
enum RangeRelation {
@@ -2005,7 +2005,7 @@ message FuzzyQuery {
20052005
optional float boost = 2;
20062006

20072007
// [optional] Query name for query tagging.
2008-
optional string underscore_name = 3;
2008+
optional string x_name = 3;
20092009

20102010
// [optional]
20112011
// The maximum number of terms to which the query can expand. Fuzzy queries "expand to" a number of matching terms that are within the distance specified in fuzziness. Then OpenSearch tries to match those terms. Default is 50.
@@ -2086,7 +2086,7 @@ message IdsQuery {
20862086
optional float boost = 1;
20872087

20882088
// [optional] Query name for query tagging.
2089-
optional string underscore_name = 2;
2089+
optional string x_name = 2;
20902090

20912091
repeated string values = 3;
20922092

@@ -2144,7 +2144,7 @@ message MatchAllQuery {
21442144
optional float boost = 1;
21452145

21462146
// [optional] Query name for query tagging.
2147-
optional string underscore_name = 2;
2147+
optional string x_name = 2;
21482148
}
21492149

21502150
message MatchBoolPrefixQuery {
@@ -2155,7 +2155,7 @@ message MatchBoolPrefixQuery {
21552155
optional float boost = 2;
21562156

21572157
// [optional] Query name for query tagging.
2158-
optional string underscore_name = 3;
2158+
optional string x_name = 3;
21592159

21602160
// [optional]
21612161
// The analyzer used to tokenize the query string text.
@@ -2231,7 +2231,7 @@ message MatchNoneQuery {
22312231
optional float boost = 1;
22322232

22332233
// [optional] Query name for query tagging.
2234-
optional string underscore_name = 2;
2234+
optional string x_name = 2;
22352235
}
22362236

22372237

@@ -2248,7 +2248,7 @@ message MatchPhrasePrefixQuery {
22482248
optional float boost = 1;
22492249

22502250
// [optional] Query name for query tagging.
2251-
optional string underscore_name = 2;
2251+
optional string x_name = 2;
22522252

22532253
// [optional]
22542254
// The analyzer used to tokenize the query string text.
@@ -2284,7 +2284,7 @@ message MatchPhraseQuery {
22842284
optional float boost = 2;
22852285

22862286
// [optional] The name of the query for query tagging.
2287-
optional string underscore_name = 3;
2287+
optional string x_name = 3;
22882288

22892289
// [optional]
22902290
// The analyzer used to tokenize the query string text.
@@ -2314,7 +2314,7 @@ message MultiMatchQuery {
23142314
optional float boost = 2;
23152315

23162316
// [optional] The name of the query for query tagging.
2317-
optional string underscore_name = 3;
2317+
optional string x_name = 3;
23182318

23192319
// [optional] The analyzer used to tokenize the query string text. Default is the index-time analyzer specified for the default_field. If no analyzer is specified for the default_field, the analyzer is the default analyzer for the index. For more information about index.query.default_field, see Dynamic index-level index settings.
23202320
optional string analyzer = 4;
@@ -2739,19 +2739,19 @@ message InlineGet {
27392739

27402740
bool found = 2;
27412741

2742-
int64 underscore_seq_no = 3;
2742+
int64 x_seq_no = 3;
27432743

2744-
int64 underscore_primary_term = 4;
2744+
int64 x_primary_term = 4;
27452745

2746-
repeated string underscore_routing = 5;
2746+
repeated string x_routing = 5;
27472747

27482748
oneof inline_get_source {
27492749

27502750
// struct_source field to be returned upon explicit request by user
27512751
.google.protobuf.Struct struct_source = 6;
27522752

27532753
// Use bytes for better latency/performance, as it reduces payload size over the wire
2754-
bytes underscore_source = 7;
2754+
bytes x_source = 7;
27552755

27562756
}
27572757
}

0 commit comments

Comments
 (0)