Skip to content

Commit f11c6ea

Browse files
committed
remove SimpleQueryStringQuery and BoostingQuery support
Signed-off-by: xil <fridalu66@gmail.com>
1 parent 30ebc99 commit f11c6ea

2 files changed

Lines changed: 3 additions & 241 deletions

File tree

protos/schemas/common.proto

Lines changed: 1 addition & 241 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ option go_package = "github.com/opensearch-project/opensearch-protobufs/go/opens
88
option java_multiple_files = true;
99
option java_outer_classname = "CommonProto";
1010
option java_package = "org.opensearch.protobufs";
11-
import "google/protobuf/descriptor.proto";
12-
13-
// Custom field option for tooling
14-
extend google.protobuf.FieldOptions {
15-
// Mark a field to be skipped by tooling. These fields are manually maintained and won't be marked as deprecated.
16-
optional bool tooling_skip = 50001;
17-
}
1811

1912
// The Search API operation to perform a search across all indices in the cluster or index search
2013
message SearchRequest {
@@ -220,9 +213,6 @@ message SearchRequestBody {
220213

221214
// [optional] Values used to boost the score of specified indexes. Specify in the format of <index> : <boost-multiplier>
222215
repeated FloatMap indices_boost_2 = 36;
223-
224-
// Defines the aggregations that are run as part of the search request.
225-
map<string, AggregationContainer> aggregations = 37;
226216
}
227217

228218
message DerivedField {
@@ -299,8 +289,6 @@ message SearchResponse {
299289

300290
// [optional] If the query was terminated early, the terminated_early flag will be set to true in the response
301291
optional bool terminated_early = 13;
302-
303-
map<string, Aggregate> aggregations = 14;
304292
}
305293

306294
message ProcessorExecutionDetail {
@@ -902,18 +890,6 @@ message BulkRequestBody {
902890

903891
// [optional]
904892
optional bytes object = 3;
905-
906-
// EXPERIMENTAL field
907-
// [optional] Map of fully-qualified field path -> typed value.
908-
// This field is intended for large field values, such as large vectors, that
909-
// should be provided separately from `_source`.
910-
// Supported operations: index, create and update
911-
// Compatibility:
912-
// - May be provided together with `object`and update_action.
913-
// - `object` and `update_action` continue to represent `_source`.
914-
// - `extra_field_values` provides additional out-of-band field values and does
915-
// not replace `_source`.
916-
map<string, BinaryFieldValue> extra_field_values = 4 [(tooling_skip) = true];
917893
}
918894

919895
message OperationContainer {
@@ -2853,51 +2829,6 @@ message HitMatchedQueries {
28532829
}
28542830
}
28552831

2856-
message BinaryFieldValue {
2857-
oneof binary_field_value {
2858-
2859-
// [optional] Raw bytes payload for a field-specific binary representation.
2860-
BytesValue bytes_value = 1;
2861-
2862-
// [optional] Float array payload for fields that support vector-like input.
2863-
FloatArrayValue float_array_value = 2;
2864-
2865-
}
2866-
}
2867-
2868-
message BytesValue {
2869-
2870-
// [required] Raw bytes for the field value.
2871-
bytes bytes = 1;
2872-
}
2873-
2874-
message FloatArrayValue {
2875-
oneof encoding {
2876-
2877-
// [optional] Fast path: 4 * dimension bytes, little-endian binary float array.
2878-
FloatBinaryLE binary_le = 1;
2879-
2880-
// [optional] Simple path: packed array
2881-
FloatList values = 2;
2882-
}
2883-
}
2884-
2885-
message FloatBinaryLE {
2886-
2887-
// [required] Raw float data encoded as little-endian IEEE-754 float32 values.
2888-
bytes bytes_le = 1;
2889-
2890-
// [required] Number of float elements in the payload.
2891-
int32 dimension = 2;
2892-
}
2893-
2894-
message FloatList {
2895-
2896-
// [required] Float values for the field.
2897-
repeated float values = 1;
2898-
}
2899-
2900-
29012832
message BoostingQuery {
29022833

29032834
// 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.
@@ -2985,146 +2916,6 @@ message FloatMap {
29852916
map<string, float> float_map = 1;
29862917
}
29872918

2988-
message Aggregate {
2989-
2990-
// The custom metadata attached to a resource.
2991-
optional ObjectMap meta = 1;
2992-
2993-
repeated ObjectMap buckets = 2;
2994-
2995-
optional int64 doc_count_error_upper_bound = 3;
2996-
2997-
optional int64 sum_other_doc_count = 4;
2998-
2999-
SingleMetricAggregateBaseValue value = 5;
3000-
3001-
optional string value_as_string = 6;
3002-
}
3003-
3004-
message AggregationContainer {
3005-
3006-
// Custom metadata to associate with the aggregation (optional)
3007-
optional ObjectMap meta = 1;
3008-
oneof aggregation_container {
3009-
MaxAggregation max = 2;
3010-
3011-
MinAggregation min = 3;
3012-
3013-
TermsAggregation terms_aggregation = 4;
3014-
3015-
}
3016-
}
3017-
3018-
message MaxAggregation {
3019-
3020-
optional FieldValue missing = 1;
3021-
3022-
// The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields.
3023-
optional string field = 2;
3024-
3025-
optional Script script = 3;
3026-
3027-
optional string format = 4;
3028-
3029-
optional ValueType value_type = 5;
3030-
}
3031-
3032-
message MinAggregation {
3033-
3034-
optional FieldValue missing = 1;
3035-
3036-
// The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields.
3037-
optional string field = 2;
3038-
3039-
optional Script script = 3;
3040-
3041-
optional string format = 4;
3042-
3043-
optional ValueType value_type = 5;
3044-
}
3045-
3046-
message SingleMetricAggregateBaseValue {
3047-
oneof single_metric_aggregate_base_value {
3048-
double double = 1;
3049-
3050-
NullValue null_value = 2;
3051-
3052-
}
3053-
}
3054-
3055-
message SortOrderSingleMap {
3056-
3057-
string field = 1;
3058-
3059-
SortOrder sort_order = 2;
3060-
}
3061-
3062-
message TermsAggregation {
3063-
3064-
// Sub-aggregations for this bucket aggregation
3065-
map<string, AggregationContainer> aggregations = 1;
3066-
3067-
TermsAggregationFields terms = 2;
3068-
}
3069-
3070-
message TermsAggregationFields {
3071-
3072-
optional TermsAggregationCollectMode collect_mode = 1;
3073-
3074-
repeated string exclude = 2;
3075-
3076-
optional TermsAggregationExecutionHint execution_hint = 3;
3077-
3078-
optional TermsInclude include = 4;
3079-
3080-
// Only return values that are found in more than `min_doc_count` hits.
3081-
optional int64 min_doc_count = 5;
3082-
3083-
optional FieldValue missing = 6;
3084-
3085-
// Coerced unmapped fields into the specified type.
3086-
optional ValueType value_type = 7;
3087-
3088-
repeated SortOrderSingleMap order = 8;
3089-
3090-
// The number of candidate terms produced by each shard. By default, `shard_size` will be automatically estimated based on the number of shards and the `size` parameter.
3091-
optional int32 shard_size = 9;
3092-
3093-
// The minimum number of documents in a bucket on each shard for it to be returned.
3094-
optional int64 shard_min_doc_count = 10;
3095-
3096-
// Set to `true` to return the `doc_count_error_upper_bound`, which is an upper bound to the error on the `doc_count` returned by each shard.
3097-
optional bool show_term_doc_count_error = 11;
3098-
3099-
// The number of buckets returned out of the overall terms list.
3100-
optional int32 size = 12;
3101-
3102-
optional string format = 13;
3103-
3104-
// The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields.
3105-
optional string field = 14;
3106-
3107-
optional Script script = 15;
3108-
}
3109-
3110-
message TermsInclude {
3111-
oneof terms_include {
3112-
StringArray terms = 1;
3113-
3114-
TermsPartition partition = 2;
3115-
3116-
}
3117-
}
3118-
3119-
message TermsPartition {
3120-
3121-
// The number of partitions.
3122-
int32 num_partitions = 1;
3123-
3124-
// The partition number for this request.
3125-
int32 partition = 2;
3126-
}
3127-
31282919
enum FieldValueFactorModifier {
31292920
FIELD_VALUE_FACTOR_MODIFIER_UNSPECIFIED = 0;
31302921
FIELD_VALUE_FACTOR_MODIFIER_LN = 1;
@@ -3460,37 +3251,6 @@ enum SimpleQueryStringFlag {
34603251
SIMPLE_QUERY_STRING_FLAG_WHITESPACE = 13;
34613252
}
34623253

3463-
enum TermsAggregationCollectMode {
3464-
TERMS_AGGREGATION_COLLECT_MODE_UNSPECIFIED = 0;
3465-
TERMS_AGGREGATION_COLLECT_MODE_BREADTH_FIRST = 1;
3466-
TERMS_AGGREGATION_COLLECT_MODE_DEPTH_FIRST = 2;
3467-
}
3468-
3469-
enum TermsAggregationExecutionHint {
3470-
TERMS_AGGREGATION_EXECUTION_HINT_UNSPECIFIED = 0;
3471-
TERMS_AGGREGATION_EXECUTION_HINT_GLOBAL_ORDINALS = 1;
3472-
TERMS_AGGREGATION_EXECUTION_HINT_GLOBAL_ORDINALS_HASH = 2;
3473-
TERMS_AGGREGATION_EXECUTION_HINT_GLOBAL_ORDINALS_LOW_CARDINALITY = 3;
3474-
TERMS_AGGREGATION_EXECUTION_HINT_MAP = 4;
3475-
}
3476-
3477-
enum ValueType {
3478-
VALUE_TYPE_UNSPECIFIED = 0;
3479-
VALUE_TYPE_BOOLEAN = 1;
3480-
VALUE_TYPE_BYTE = 2;
3481-
VALUE_TYPE_DATE = 3;
3482-
VALUE_TYPE_DOUBLE = 4;
3483-
VALUE_TYPE_FLOAT = 5;
3484-
VALUE_TYPE_INTEGER = 6;
3485-
VALUE_TYPE_IP = 7;
3486-
VALUE_TYPE_LONG = 8;
3487-
VALUE_TYPE_NUMBER = 9;
3488-
VALUE_TYPE_NUMERIC = 10;
3489-
VALUE_TYPE_SHORT = 11;
3490-
VALUE_TYPE_STRING = 12;
3491-
VALUE_TYPE_UNSIGNED_LONG = 13;
3492-
}
3493-
34943254
message ObjectMap {
34953255
map<string, Value> fields = 1;
34963256

@@ -3529,4 +3289,4 @@ message GeneralNumber {
35293289
enum NullValue {
35303290
NULL_VALUE_UNSPECIFIED = 0;
35313291
NULL_VALUE_NULL = 1;
3532-
}
3292+
}

tools/proto-convert/src/config/spec-filter.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ excluded_schemas:
99
- Suggester
1010
- Suggest
1111
- AgenticQuery
12+
- BoostingQuery
1213
- DisMaxQuery
1314
- QueryStringQuery
15+
- SimpleQueryStringQuery
1416
- IntervalsQuery
1517
- ScriptScoreQuery
1618
- CommonTermsQuery

0 commit comments

Comments
 (0)