diff --git a/opensearch-openapi.yaml b/opensearch-openapi.yaml index f95214aade1..1a318f33d78 100644 --- a/opensearch-openapi.yaml +++ b/opensearch-openapi.yaml @@ -12624,6 +12624,10 @@ paths: responses: '200': $ref: '#/components/responses/indices.create___200' + '400': + $ref: '#/components/responses/indices.create___400' + '500': + $ref: '#/components/responses/indices.create___500' /{index}/_alias: get: operationId: indices.get_alias.2 @@ -30297,7 +30301,6 @@ components: title: BulkRequestBody anyOf: - $ref: '#/components/schemas/_core.bulk___OperationContainer' - x-protobuf-required: true - $ref: '#/components/schemas/_core.bulk___UpdateAction' - type: object additionalProperties: true @@ -34200,6 +34203,18 @@ components: - index - shards_acknowledged description: '' + indices.create___400: + description: Bad request error when creating index (for example, invalid mapping, settings, or field configuration). + content: + application/json: + schema: + $ref: '#/components/schemas/_common___ErrorResponseBase' + indices.create___500: + description: Internal server error when creating index (for example, plugin error, model not found). + content: + application/json: + schema: + $ref: '#/components/schemas/_common___ErrorResponseBase' indices.data_streams_stats___200: content: application/json: @@ -39416,7 +39431,6 @@ components: oneOf: - type: boolean description: Whether to refresh the affected shards immediately. - x-protobuf-excluded: true - type: string const: 'false' description: Do not refresh the affected shards. @@ -46384,6 +46398,7 @@ components: - rank_features - scaled_float - search_as_you_type + - semantic - short - text - token_count @@ -46877,6 +46892,7 @@ components: - $ref: '#/components/schemas/_common.mapping___IntegerNumberProperty' - $ref: '#/components/schemas/_common.mapping___LongNumberProperty' - $ref: '#/components/schemas/_common.mapping___ScaledFloatNumberProperty' + - $ref: '#/components/schemas/_common.mapping___SemanticProperty' - $ref: '#/components/schemas/_common.mapping___ShortNumberProperty' - $ref: '#/components/schemas/_common.mapping___UnsignedLongNumberProperty' - $ref: '#/components/schemas/_common.mapping___DateRangeProperty' @@ -46994,6 +47010,68 @@ components: - search_as_you_type required: - type + _common.mapping___SemanticChunkingStrategy: + type: object + properties: + algorithm: + type: string + parameters: + type: object + additionalProperties: {} + required: + - algorithm + _common.mapping___SemanticDenseEmbeddingConfig: + type: object + properties: + data_type: + type: string + mode: + type: string + compression_level: + type: string + method: + $ref: '#/components/schemas/_common.mapping___KnnVectorMethod' + _common.mapping___SemanticProperty: + x-version-added: '3.1' + type: object + properties: + type: + type: string + enum: + - semantic + raw_field_type: + type: string + model_id: + type: string + search_model_id: + type: string + semantic_info_field_name: + type: string + chunking: + oneOf: + - type: boolean + - type: array + items: + $ref: '#/components/schemas/_common.mapping___SemanticChunkingStrategy' + semantic_field_search_analyzer: + type: string + dense_embedding_config: + $ref: '#/components/schemas/_common.mapping___SemanticDenseEmbeddingConfig' + sparse_encoding_config: + $ref: '#/components/schemas/_common.mapping___SemanticSparseEncodingConfig' + skip_existing_embedding: + type: boolean + default: false + required: + - model_id + - type + _common.mapping___SemanticSparseEncodingConfig: + type: object + properties: + prune_type: + type: string + prune_ratio: + type: number _common.mapping___ShortNumberProperty: allOf: - $ref: '#/components/schemas/_common.mapping___NumberPropertyBase' @@ -48358,7 +48436,7 @@ components: description: If `true`, match phrase queries are automatically created for multi-term synonyms. type: boolean cutoff_frequency: - deprecated: true + x-version-deprecated: '2.0' type: number format: float fields: @@ -48557,44 +48635,6 @@ components: $ref: '#/components/schemas/_common___VersionNumber' required: - field - _common.query_dsl___PinnedDoc: - type: object - properties: - _id: - $ref: '#/components/schemas/_common___Id' - _index: - $ref: '#/components/schemas/_common___IndexName' - required: - - _id - - _index - _common.query_dsl___PinnedQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - allOf: - - type: object - properties: - organic: - $ref: '#/components/schemas/_common.query_dsl___QueryContainer' - required: - - organic - - type: object - properties: - ids: - description: |- - Document IDs listed in the order they are to appear in results. - Required if `docs` is not specified. - type: array - items: - $ref: '#/components/schemas/_common___Id' - docs: - description: |- - Documents listed in the order they are to appear in results. - Required if `ids` is not specified. - type: array - items: - $ref: '#/components/schemas/_common.query_dsl___PinnedDoc' - minProperties: 1 - maxProperties: 1 _common.query_dsl___PrefixQuery: oneOf: - title: value @@ -48763,8 +48803,6 @@ components: $ref: '#/components/schemas/_common.query_dsl___ParentIdQuery' percolate: $ref: '#/components/schemas/_common.query_dsl___PercolateQuery' - pinned: - $ref: '#/components/schemas/_common.query_dsl___PinnedQuery' prefix: description: Returns documents that contain a specific prefix in a provided field. type: object diff --git a/protos/generated/models/aggregated_models.proto b/protos/generated/models/aggregated_models.proto index a7552f12fc1..271c3205295 100644 --- a/protos/generated/models/aggregated_models.proto +++ b/protos/generated/models/aggregated_models.proto @@ -367,14 +367,11 @@ message AggregationProfile { string description = 2; - // Time unit for nanoseconds. - int64 time_in_nanos = 3; + string type = 3; - string type = 4; + optional AggregationProfileDebug debug = 4; - optional AggregationProfileDebug debug = 5; - - repeated AggregationProfile children = 6; + repeated AggregationProfile children = 5; } message AggregationProfileDebug { optional int32 segments_with_multi_valued_ords = 1; @@ -518,6 +515,7 @@ message AutoDateHistogramAggregation { optional MinimumInterval minimum_interval = 8; + // A date and time, either as a string whose format depends on the context (defaulting to ISO_8601) or the number of milliseconds since the epoch. OpenSearch accepts both as an input but will generally output a string. representation. optional string missing = 9; // Time zone specified as a ISO 8601 UTC offset. @@ -880,10 +878,7 @@ message Collector { string reason = 2; - // Time unit for nanoseconds. - int64 time_in_nanos = 3; - - repeated Collector children = 4; + repeated Collector children = 3; } enum CombinedFieldsOperator { COMBINED_FIELDS_OPERATOR_UNSPECIFIED = 0; @@ -1252,6 +1247,7 @@ message DateDecayPlacement { // A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts `0` without a unit and `-1` to indicate an unspecified value. optional string offset = 2; + // A date and time, either as a string whose format depends on the context (defaulting to ISO_8601) or the number of milliseconds since the epoch. OpenSearch accepts both as an input but will generally output a string. representation. optional string origin = 3; // A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts `0` without a unit and `-1` to indicate an unspecified value. @@ -1296,6 +1292,7 @@ message DateHistogramAggregation { // Only returns buckets that have `min_doc_count` number of documents. By default, all buckets between the first bucket that matches documents and the last one are returned. optional int32 min_doc_count = 12; + // A date and time, either as a string whose format depends on the context (defaulting to ISO_8601) or the number of milliseconds since the epoch. OpenSearch accepts both as an input but will generally output a string. representation. optional string missing = 13; // A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts `0` without a unit and `-1` to indicate an unspecified value. @@ -1317,9 +1314,6 @@ message DateHistogramBucket { int64 doc_count = 1; optional string key_as_string = 2; - - // The time unit for milliseconds. - int64 key = 3; } message DateRangeAggregate { // The custom metadata attached to a resource. @@ -1412,14 +1406,6 @@ message DateRangeQueryAllOfTo { NullValue null_value = 2; } } -message DateTime { - oneof date_time { - string string = 1; - - // The time unit for milliseconds. - int64 int64 = 2; - } -} enum Day { DAY_UNSPECIFIED = 0; DAY_DAY = 1; @@ -1962,14 +1948,11 @@ message FetchProfile { string description = 2; - // Time unit for nanoseconds. - int64 time_in_nanos = 3; + FetchProfileBreakdown breakdown = 3; - FetchProfileBreakdown breakdown = 4; + optional FetchProfileDebug debug = 4; - optional FetchProfileDebug debug = 5; - - repeated FetchProfile children = 6; + repeated FetchProfile children = 5; } message FetchProfileBreakdown { optional int32 load_source = 1; @@ -2065,11 +2048,11 @@ message FieldSuggester { optional string text = 3; - optional CompletionSuggester completion = 4; - - optional PhraseSuggester phrase = 5; - - optional TermSuggester term = 6; + oneof field_suggester { + CompletionSuggester completion = 4; + PhraseSuggester phrase = 5; + TermSuggester term = 6; + } } enum FieldType { FIELD_TYPE_UNSPECIFIED = 0; @@ -2111,14 +2094,15 @@ enum FieldType { FIELD_TYPE_RANK_FEATURES = 36; FIELD_TYPE_SCALED_FLOAT = 37; FIELD_TYPE_SEARCH_AS_YOU_TYPE = 38; - FIELD_TYPE_SHORT = 39; - FIELD_TYPE_TEXT = 40; - FIELD_TYPE_TOKEN_COUNT = 41; - FIELD_TYPE_UNSIGNED_LONG = 42; - FIELD_TYPE_VERSION = 43; - FIELD_TYPE_WILDCARD = 44; - FIELD_TYPE_XY_POINT = 45; - FIELD_TYPE_XY_SHAPE = 46; + FIELD_TYPE_SEMANTIC = 39; + FIELD_TYPE_SHORT = 40; + FIELD_TYPE_TEXT = 41; + FIELD_TYPE_TOKEN_COUNT = 42; + FIELD_TYPE_UNSIGNED_LONG = 43; + FIELD_TYPE_VERSION = 44; + FIELD_TYPE_WILDCARD = 45; + FIELD_TYPE_XY_POINT = 46; + FIELD_TYPE_XY_SHAPE = 47; } message FieldValue { optional bool bool = 1; @@ -2241,17 +2225,14 @@ message FunctionScoreContainer { optional float weight = 2; - optional DecayFunction exp = 3; - - optional DecayFunction gauss = 4; - - optional DecayFunction linear = 5; - - optional FieldValueFactorScoreFunction field_value_factor = 6; - - optional RandomScoreFunction random_score = 7; - - optional ScriptScoreFunction script_score = 8; + oneof function_score_container { + DecayFunction exp = 3; + DecayFunction gauss = 4; + DecayFunction linear = 5; + FieldValueFactorScoreFunction field_value_factor = 6; + RandomScoreFunction random_score = 7; + ScriptScoreFunction script_score = 8; + } } enum FunctionScoreMode { FUNCTION_SCORE_MODE_UNSPECIFIED = 0; @@ -3347,36 +3328,27 @@ message IntervalsAnyOf { optional IntervalsFilter filter = 2; } message IntervalsContainer { - optional IntervalsAllOf all_of = 1; - - optional IntervalsAnyOf any_of = 2; - - optional IntervalsFuzzy fuzzy = 3; - - optional IntervalsMatch match = 4; - - optional IntervalsPrefix prefix = 5; - - optional IntervalsWildcard wildcard = 6; + oneof intervals_container { + IntervalsAllOf all_of = 1; + IntervalsAnyOf any_of = 2; + IntervalsFuzzy fuzzy = 3; + IntervalsMatch match = 4; + IntervalsPrefix prefix = 5; + IntervalsWildcard wildcard = 6; + } } message IntervalsFilter { - optional IntervalsContainer after = 1; - - optional IntervalsContainer before = 2; - - optional IntervalsContainer contained_by = 3; - - optional IntervalsContainer containing = 4; - - optional IntervalsContainer not_contained_by = 5; - - optional IntervalsContainer not_containing = 6; - - optional IntervalsContainer not_overlapping = 7; - - optional IntervalsContainer overlapping = 8; - - optional Script script = 9; + oneof intervals_filter { + IntervalsContainer after = 1; + IntervalsContainer before = 2; + IntervalsContainer contained_by = 3; + IntervalsContainer containing = 4; + IntervalsContainer not_contained_by = 5; + IntervalsContainer not_containing = 6; + IntervalsContainer not_overlapping = 7; + IntervalsContainer overlapping = 8; + Script script = 9; + } } message IntervalsFuzzy { // Analyzer used to normalize the term. @@ -3430,19 +3402,16 @@ message IntervalsQuery { optional string x_name = 2; - optional IntervalsAllOf all_of = 3; - - optional IntervalsAnyOf any_of = 4; - - optional IntervalsFuzzy fuzzy = 5; - - optional IntervalsMatch match = 6; - - optional IntervalsPrefix prefix = 7; - - optional IntervalsWildcard wildcard = 8; - string field = 9; + + oneof intervals_query { + IntervalsAllOf all_of = 3; + IntervalsAnyOf any_of = 4; + IntervalsFuzzy fuzzy = 5; + IntervalsMatch match = 6; + IntervalsPrefix prefix = 7; + IntervalsWildcard wildcard = 8; + } } message IntervalsWildcard { // Analyzer used to analyze the `pattern`. Defaults to the top-level field's analyzer. @@ -3498,13 +3467,12 @@ message IpRangeBucket { optional string to = 4; } message Item { - optional ResponseItem index = 1; - - optional ResponseItem create = 2; - - optional ResponseItem update = 3; - - optional ResponseItem delete = 4; + oneof item { + ResponseItem index = 1; + ResponseItem create = 2; + ResponseItem update = 3; + ResponseItem delete = 4; + } } message KeyedPercentilesValue { oneof keyed_percentiles_value { @@ -3762,34 +3730,32 @@ message MatchQuery { // If `true`, match phrase queries are automatically created for multi-term synonyms. optional bool auto_generate_synonyms_phrase_query = 4; - optional float cutoff_frequency = 5; + optional Fuzziness fuzziness = 5; - optional Fuzziness fuzziness = 6; - - optional MultiTermQueryRewrite fuzzy_rewrite = 7; + optional MultiTermQueryRewrite fuzzy_rewrite = 6; // If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`). - optional bool fuzzy_transpositions = 8; + optional bool fuzzy_transpositions = 7; // If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored. - optional bool lenient = 9; + optional bool lenient = 8; // Maximum number of terms to which the query will expand. - optional int32 max_expansions = 10; + optional int32 max_expansions = 9; - optional MinimumShouldMatch minimum_should_match = 11; + optional MinimumShouldMatch minimum_should_match = 10; - optional Operator operator = 12; + optional Operator operator = 11; // Number of beginning characters left unchanged for fuzzy matching. - optional int32 prefix_length = 13; + optional int32 prefix_length = 12; // Text, number, Boolean value or date you wish to find in the provided field. - FieldValue query = 14; + FieldValue query = 13; - optional ZeroTermsQuery zero_terms_query = 15; + optional ZeroTermsQuery zero_terms_query = 14; - string field = 16; + string field = 15; } message MatrixAggregation { // The custom metadata attached to a resource. @@ -4342,43 +4308,41 @@ message MultiMatchQuery { // If `true`, match phrase queries are automatically created for multi-term synonyms. optional bool auto_generate_synonyms_phrase_query = 4; - optional float cutoff_frequency = 5; - // A comma-separated list or a wildcard expression specifying the fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. - repeated string fields = 6; + repeated string fields = 5; - optional Fuzziness fuzziness = 7; + optional Fuzziness fuzziness = 6; - optional MultiTermQueryRewrite fuzzy_rewrite = 8; + optional MultiTermQueryRewrite fuzzy_rewrite = 7; // If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`). Can be applied to the term subqueries constructed for all terms but the final term. - optional bool fuzzy_transpositions = 9; + optional bool fuzzy_transpositions = 8; // If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored. - optional bool lenient = 10; + optional bool lenient = 9; // Maximum number of terms to which the query will expand. - optional int32 max_expansions = 11; + optional int32 max_expansions = 10; - optional MinimumShouldMatch minimum_should_match = 12; + optional MinimumShouldMatch minimum_should_match = 11; - optional Operator operator = 13; + optional Operator operator = 12; // Number of beginning characters left unchanged for fuzzy matching. - optional int32 prefix_length = 14; + optional int32 prefix_length = 13; // Text, number, Boolean value or date you wish to find in the provided field. - string query = 15; + string query = 14; // Maximum number of positions allowed between matching tokens. - optional int32 slop = 16; + optional int32 slop = 15; // Determines how scores for each per-term blended query and scores across groups are combined. - optional float tie_breaker = 17; + optional float tie_breaker = 16; - optional TextQueryType type = 18; + optional TextQueryType type = 17; - optional ZeroTermsQuery zero_terms_query = 19; + optional ZeroTermsQuery zero_terms_query = 18; } message MultiTermLookup { // The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields. @@ -4648,13 +4612,12 @@ message OperationBase { optional string x_index = 3; } message OperationContainer { - optional IndexOperation index = 1; - - optional WriteOperation create = 2; - - optional UpdateOperation update = 3; - - optional DeleteOperation delete = 4; + oneof operation_container { + IndexOperation index = 1; + WriteOperation create = 2; + UpdateOperation update = 3; + DeleteOperation delete = 4; + } } enum Operator { OPERATOR_UNSPECIFIED = 0; @@ -4901,26 +4864,6 @@ message PhraseSuggester { optional int32 token_limit = 16; } -message PinnedDoc { - // The unique identifier for a resource. - string x_id = 1; - - string x_index = 2; -} -message PinnedQuery { - // 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. - optional float boost = 1; - - optional string x_name = 2; - - QueryContainer organic = 3; - - // Document IDs listed in the order they are to appear in results. Required if `docs` is not specified. - repeated string ids = 4; - - // Documents listed in the order they are to appear in results. Required if `ids` is not specified. - repeated PinnedDoc docs = 5; -} message PipelineAggregationBase { // The custom metadata attached to a resource. optional ObjectMap meta = 1; @@ -5024,148 +4967,89 @@ message QueryBreakdown { int64 set_min_competitive_score_count = 18; } message QueryContainer { - optional BoolQuery bool = 1; - - optional BoostingQuery boosting = 2; - - optional CommonTermsQuery common = 3; - - optional CombinedFieldsQuery combined_fields = 4; - - optional ConstantScoreQuery constant_score = 5; - - optional DisMaxQuery dis_max = 6; - - optional DistanceFeatureQuery distance_feature = 7; - - optional ExistsQuery exists = 8; - - optional FunctionScoreQuery function_score = 9; - - // Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance. - optional FuzzyQuery fuzzy = 10; - - optional GeoBoundingBoxQuery geo_bounding_box = 11; - - optional GeoDistanceQuery geo_distance = 12; - - optional GeoPolygonQuery geo_polygon = 13; - - optional GeoShapeQuery geo_shape = 14; - - optional HasChildQuery has_child = 15; - - optional HasParentQuery has_parent = 16; - - optional HybridQuery hybrid = 17; - - optional IdsQuery ids = 18; - - // Returns documents based on the order and proximity of matching terms. - optional IntervalsQuery intervals = 19; - - optional KnnQuery knn = 20; - - // Returns documents that match a provided text, number, date or Boolean value. The provided text is analyzed before matching. - optional MatchQuery match = 21; - - optional MatchAllQuery match_all = 22; - - // Analyzes its input and constructs a `bool` query from the terms. Each term except the last is used in a `term` query. The last term is used in a prefix query. - optional MatchBoolPrefixQuery match_bool_prefix = 23; - - optional MatchNoneQuery match_none = 24; - - // Analyzes the text and creates a phrase query out of the analyzed text. - optional MatchPhraseQuery match_phrase = 25; - - // Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term. - optional MatchPhrasePrefixQuery match_phrase_prefix = 26; - - optional MoreLikeThisQuery more_like_this = 27; - - optional MultiMatchQuery multi_match = 28; - - optional NestedQuery nested = 29; - - optional NeuralQuery neural = 30; - - optional ParentIdQuery parent_id = 31; - - optional PercolateQuery percolate = 32; - - optional PinnedQuery pinned = 33; - - // Returns documents that contain a specific prefix in a provided field. - optional PrefixQuery prefix = 34; - - optional QueryStringQuery query_string = 35; - - // Returns documents that contain terms within a provided range. - optional RangeQuery range = 36; - - optional RankFeatureQuery rank_feature = 37; - - // Returns documents that contain terms matching a regular expression. - optional RegexpQuery regexp = 38; - - optional ScriptQuery script = 39; - - optional ScriptScoreQuery script_score = 40; - - optional SimpleQueryStringQuery simple_query_string = 41; - - optional SpanContainingQuery span_containing = 42; - - optional SpanFieldMaskingQuery field_masking_span = 43; - - optional SpanFirstQuery span_first = 44; - - optional SpanMultiTermQuery span_multi = 45; - - optional SpanNearQuery span_near = 46; - - optional SpanNotQuery span_not = 47; - - optional SpanOrQuery span_or = 48; - - // Matches spans containing a term. - optional SpanTermQuery span_term = 49; - - optional SpanWithinQuery span_within = 50; - - // Return documents using a template query contains placeholders that are resolved by search request processors during query execution. - optional ObjectMap template = 51; - - // Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including white space and capitalization. - optional TermQuery term = 52; - - // Returns documents that contain one or more exact terms in a provided field. - optional TermsQuery terms = 53; - - // Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including white space and capitalization. - optional TermsSetQuery terms_set = 54; - - optional TypeQuery type = 55; - - // Returns documents that contain terms matching a wildcard pattern. - optional WildcardQuery wildcard = 56; - - optional WrapperQuery wrapper = 57; - - optional XyShapeQuery xy_shape = 58; + oneof query_container { + BoolQuery bool = 1; + BoostingQuery boosting = 2; + CommonTermsQuery common = 3; + CombinedFieldsQuery combined_fields = 4; + ConstantScoreQuery constant_score = 5; + DisMaxQuery dis_max = 6; + DistanceFeatureQuery distance_feature = 7; + ExistsQuery exists = 8; + FunctionScoreQuery function_score = 9; + // Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance. + FuzzyQuery fuzzy = 10; + GeoBoundingBoxQuery geo_bounding_box = 11; + GeoDistanceQuery geo_distance = 12; + GeoPolygonQuery geo_polygon = 13; + GeoShapeQuery geo_shape = 14; + HasChildQuery has_child = 15; + HasParentQuery has_parent = 16; + HybridQuery hybrid = 17; + IdsQuery ids = 18; + // Returns documents based on the order and proximity of matching terms. + IntervalsQuery intervals = 19; + KnnQuery knn = 20; + // Returns documents that match a provided text, number, date or Boolean value. The provided text is analyzed before matching. + MatchQuery match = 21; + MatchAllQuery match_all = 22; + // Analyzes its input and constructs a `bool` query from the terms. Each term except the last is used in a `term` query. The last term is used in a prefix query. + MatchBoolPrefixQuery match_bool_prefix = 23; + MatchNoneQuery match_none = 24; + // Analyzes the text and creates a phrase query out of the analyzed text. + MatchPhraseQuery match_phrase = 25; + // Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term. + MatchPhrasePrefixQuery match_phrase_prefix = 26; + MoreLikeThisQuery more_like_this = 27; + MultiMatchQuery multi_match = 28; + NestedQuery nested = 29; + NeuralQuery neural = 30; + ParentIdQuery parent_id = 31; + PercolateQuery percolate = 32; + // Returns documents that contain a specific prefix in a provided field. + PrefixQuery prefix = 33; + QueryStringQuery query_string = 34; + // Returns documents that contain terms within a provided range. + RangeQuery range = 35; + RankFeatureQuery rank_feature = 36; + // Returns documents that contain terms matching a regular expression. + RegexpQuery regexp = 37; + ScriptQuery script = 38; + ScriptScoreQuery script_score = 39; + SimpleQueryStringQuery simple_query_string = 40; + SpanContainingQuery span_containing = 41; + SpanFieldMaskingQuery field_masking_span = 42; + SpanFirstQuery span_first = 43; + SpanMultiTermQuery span_multi = 44; + SpanNearQuery span_near = 45; + SpanNotQuery span_not = 46; + SpanOrQuery span_or = 47; + // Matches spans containing a term. + SpanTermQuery span_term = 48; + SpanWithinQuery span_within = 49; + // Return documents using a template query contains placeholders that are resolved by search request processors during query execution. + ObjectMap template = 50; + // Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including white space and capitalization. + TermQuery term = 51; + // Returns documents that contain one or more exact terms in a provided field. + TermsQuery terms = 52; + // Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including white space and capitalization. + TermsSetQuery terms_set = 53; + TypeQuery type = 54; + // Returns documents that contain terms matching a wildcard pattern. + WildcardQuery wildcard = 55; + WrapperQuery wrapper = 56; + XyShapeQuery xy_shape = 57; + } } message QueryProfile { QueryBreakdown breakdown = 1; string description = 2; - // Time unit for nanoseconds. - int64 time_in_nanos = 3; - - string type = 4; + string type = 3; - repeated QueryProfile children = 5; + repeated QueryProfile children = 4; } message QueryStringQuery { // 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. @@ -6249,11 +6133,11 @@ message SlicedScroll { int32 max = 3; } message SmoothingModel { - optional LaplaceSmoothingModel laplace = 1; - - optional LinearInterpolationSmoothingModel linear_interpolation = 2; - - optional StupidBackoffSmoothingModel stupid_backoff = 3; + oneof smoothing_model { + LaplaceSmoothingModel laplace = 1; + LinearInterpolationSmoothingModel linear_interpolation = 2; + StupidBackoffSmoothingModel stupid_backoff = 3; + } } message SortCombinations { oneof sort_combinations { @@ -6276,11 +6160,11 @@ enum SortMode { SORT_MODE_SUM = 5; } message SortOptions { - optional ScoreSort x_score = 1; - - optional GeoDistanceSort x_geo_distance = 2; - - optional ScriptSort x_script = 3; + oneof sort_options { + ScoreSort x_score = 1; + GeoDistanceSort x_geo_distance = 2; + ScriptSort x_script = 3; + } } enum SortOrder { SORT_ORDER_UNSPECIFIED = 0; @@ -6400,26 +6284,19 @@ message SpanOrQuery { repeated SpanQuery clauses = 3; } message SpanQuery { - optional SpanContainingQuery span_containing = 1; - - optional SpanFieldMaskingQuery field_masking_span = 2; - - optional SpanFirstQuery span_first = 3; - - optional SpanGapQuery span_gap = 4; - - optional SpanMultiTermQuery span_multi = 5; - - optional SpanNearQuery span_near = 6; - - optional SpanNotQuery span_not = 7; - - optional SpanOrQuery span_or = 8; - - // The equivalent of the `term` query but for use with other span queries. - optional SpanTermQuery span_term = 9; - - optional SpanWithinQuery span_within = 10; + oneof span_query { + SpanContainingQuery span_containing = 1; + SpanFieldMaskingQuery field_masking_span = 2; + SpanFirstQuery span_first = 3; + SpanGapQuery span_gap = 4; + SpanMultiTermQuery span_multi = 5; + SpanNearQuery span_near = 6; + SpanNotQuery span_not = 7; + SpanOrQuery span_or = 8; + // The equivalent of the `term` query but for use with other span queries. + SpanTermQuery span_term = 9; + SpanWithinQuery span_within = 10; + } } message SpanTermQuery { // 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.