Skip to content

Commit 3317a9a

Browse files
Protobuf schema change detected (#377)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: lucy66hw <178352792+lucy66hw@users.noreply.github.com>
1 parent dbeaf36 commit 3317a9a

File tree

1 file changed

+89
-2
lines changed

1 file changed

+89
-2
lines changed

protos/schemas/common.proto

Lines changed: 89 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
syntax = "proto3";
55
package org.opensearch.protobufs;
66

7-
import "google/protobuf/struct.proto";
8-
97
option go_package = "github.com/opensearch-project/opensearch-protobufs/go/opensearchpb";
108
option java_multiple_files = true;
119
option java_outer_classname = "CommonProto";
@@ -1418,6 +1416,10 @@ message QueryContainer {
14181416
// To combine relevance scores from multiple queries into one score for a given document.
14191417
HybridQuery hybrid = 32;
14201418

1419+
BoostingQuery boosting = 33;
1420+
1421+
SimpleQueryStringQuery simple_query_string = 34;
1422+
14211423
}
14221424
}
14231425

@@ -2821,6 +2823,74 @@ message HitMatchedQueries {
28212823
}
28222824
}
28232825

2826+
message BoostingQuery {
2827+
2828+
// Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
2829+
optional float boost = 1;
2830+
2831+
optional string x_name = 2;
2832+
2833+
// Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query.
2834+
float negative_boost = 3;
2835+
2836+
QueryContainer negative = 4;
2837+
2838+
QueryContainer positive = 5;
2839+
}
2840+
2841+
message SimpleQueryStringFlags {
2842+
oneof simple_query_string_flags {
2843+
SimpleQueryStringFlag single = 1;
2844+
2845+
string multiple = 2;
2846+
2847+
}
2848+
}
2849+
2850+
message SimpleQueryStringQuery {
2851+
2852+
// Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
2853+
optional float boost = 1;
2854+
2855+
optional string x_name = 2;
2856+
2857+
// Analyzer used to convert text in the query string into tokens.
2858+
optional string analyzer = 3;
2859+
2860+
// If `true`, the query attempts to analyze wildcard terms in the query string.
2861+
optional bool analyze_wildcard = 4;
2862+
2863+
// If `true`, the parser creates a `match_phrase` query for each multi-position token.
2864+
optional bool auto_generate_synonyms_phrase_query = 5;
2865+
2866+
optional Operator default_operator = 6;
2867+
2868+
// Array of fields you wish to search. Accepts wildcard expressions. You also can boost relevance scores for matches to particular fields using a caret (`^`) notation. Defaults to the `index.query.default_field index` setting, which has a default value of `*`.
2869+
repeated string fields = 7;
2870+
2871+
optional SimpleQueryStringFlags flags = 8;
2872+
2873+
// Maximum number of terms to which the query expands for fuzzy matching.
2874+
optional int32 fuzzy_max_expansions = 9;
2875+
2876+
// Number of beginning characters left unchanged for fuzzy matching.
2877+
optional int32 fuzzy_prefix_length = 10;
2878+
2879+
// If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).
2880+
optional bool fuzzy_transpositions = 11;
2881+
2882+
// If `true`, format-based errors, such as providing a text value for a numeric field, are ignored.
2883+
optional bool lenient = 12;
2884+
2885+
optional MinimumShouldMatch minimum_should_match = 13;
2886+
2887+
// Query string in the simple query string syntax you wish to parse and use for search.
2888+
string query = 14;
2889+
2890+
// Suffix appended to quoted text in the query string.
2891+
optional string quote_field_suffix = 15;
2892+
}
2893+
28242894
enum FieldValueFactorModifier {
28252895
FIELD_VALUE_FACTOR_MODIFIER_UNSPECIFIED = 0;
28262896
FIELD_VALUE_FACTOR_MODIFIER_LN = 1;
@@ -3139,6 +3209,23 @@ enum GeoExecution {
31393209
GEO_EXECUTION_MEMORY = 2;
31403210
}
31413211

3212+
enum SimpleQueryStringFlag {
3213+
SIMPLE_QUERY_STRING_FLAG_UNSPECIFIED = 0;
3214+
SIMPLE_QUERY_STRING_FLAG_ALL = 1;
3215+
SIMPLE_QUERY_STRING_FLAG_AND = 2;
3216+
SIMPLE_QUERY_STRING_FLAG_ESCAPE = 3;
3217+
SIMPLE_QUERY_STRING_FLAG_FUZZY = 4;
3218+
SIMPLE_QUERY_STRING_FLAG_NEAR = 5;
3219+
SIMPLE_QUERY_STRING_FLAG_NONE = 6;
3220+
SIMPLE_QUERY_STRING_FLAG_NOT = 7;
3221+
SIMPLE_QUERY_STRING_FLAG_OR = 8;
3222+
SIMPLE_QUERY_STRING_FLAG_PHRASE = 9;
3223+
SIMPLE_QUERY_STRING_FLAG_PRECEDENCE = 10;
3224+
SIMPLE_QUERY_STRING_FLAG_PREFIX = 11;
3225+
SIMPLE_QUERY_STRING_FLAG_SLOP = 12;
3226+
SIMPLE_QUERY_STRING_FLAG_WHITESPACE = 13;
3227+
}
3228+
31423229
message ObjectMap {
31433230
map<string, Value> fields = 1;
31443231

0 commit comments

Comments
 (0)