|
4 | 4 | syntax = "proto3"; |
5 | 5 | package org.opensearch.protobufs; |
6 | 6 |
|
7 | | -import "google/protobuf/struct.proto"; |
8 | | - |
9 | 7 | option go_package = "github.com/opensearch-project/opensearch-protobufs/go/opensearchpb"; |
10 | 8 | option java_multiple_files = true; |
11 | 9 | option java_outer_classname = "CommonProto"; |
@@ -1418,6 +1416,10 @@ message QueryContainer { |
1418 | 1416 | // To combine relevance scores from multiple queries into one score for a given document. |
1419 | 1417 | HybridQuery hybrid = 32; |
1420 | 1418 |
|
| 1419 | + BoostingQuery boosting = 33; |
| 1420 | + |
| 1421 | + SimpleQueryStringQuery simple_query_string = 34; |
| 1422 | + |
1421 | 1423 | } |
1422 | 1424 | } |
1423 | 1425 |
|
@@ -2821,6 +2823,74 @@ message HitMatchedQueries { |
2821 | 2823 | } |
2822 | 2824 | } |
2823 | 2825 |
|
| 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 | + |
2824 | 2894 | enum FieldValueFactorModifier { |
2825 | 2895 | FIELD_VALUE_FACTOR_MODIFIER_UNSPECIFIED = 0; |
2826 | 2896 | FIELD_VALUE_FACTOR_MODIFIER_LN = 1; |
@@ -3139,6 +3209,23 @@ enum GeoExecution { |
3139 | 3209 | GEO_EXECUTION_MEMORY = 2; |
3140 | 3210 | } |
3141 | 3211 |
|
| 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 | + |
3142 | 3229 | message ObjectMap { |
3143 | 3230 | map<string, Value> fields = 1; |
3144 | 3231 |
|
|
0 commit comments