From 3c51f414e9bda9ef942ba40fa147d69fd5d67a98 Mon Sep 17 00:00:00 2001 From: Xtansia <1222964+Xtansia@users.noreply.github.com> Date: Mon, 9 Dec 2024 00:30:20 +0000 Subject: [PATCH] Re-generate client code using latest OpenSearch API specification (2024-12-09) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/ApiGenerator/opensearch-openapi.yaml | 1338 ++++++++++------- src/OpenSearch.Net/_Generated/Api/Enums.cs | 17 +- .../RequestParameters.AsynchronousSearch.cs | 16 +- .../RequestParameters.Cat.cs | 10 + .../RequestParameters.Indices.cs | 20 +- .../OpenSearchLowLevelClient.Indices.cs | 32 +- 6 files changed, 837 insertions(+), 596 deletions(-) diff --git a/src/ApiGenerator/opensearch-openapi.yaml b/src/ApiGenerator/opensearch-openapi.yaml index e7a7660fbc..71bd2b296a 100644 --- a/src/ApiGenerator/opensearch-openapi.yaml +++ b/src/ApiGenerator/opensearch-openapi.yaml @@ -1205,6 +1205,7 @@ paths: - $ref: '#/components/parameters/cat.snapshots___query.help' - $ref: '#/components/parameters/cat.snapshots___query.ignore_unavailable' - $ref: '#/components/parameters/cat.snapshots___query.master_timeout' + - $ref: '#/components/parameters/cat.snapshots___query.repository' - $ref: '#/components/parameters/cat.snapshots___query.s' - $ref: '#/components/parameters/cat.snapshots___query.time' - $ref: '#/components/parameters/cat.snapshots___query.v' @@ -1232,6 +1233,7 @@ paths: - $ref: '#/components/parameters/cat.snapshots___query.help' - $ref: '#/components/parameters/cat.snapshots___query.ignore_unavailable' - $ref: '#/components/parameters/cat.snapshots___query.master_timeout' + - $ref: '#/components/parameters/cat.snapshots___query.repository' - $ref: '#/components/parameters/cat.snapshots___query.s' - $ref: '#/components/parameters/cat.snapshots___query.time' - $ref: '#/components/parameters/cat.snapshots___query.v' @@ -2486,9 +2488,7 @@ paths: url: https://opensearch.org/docs/latest parameters: - $ref: '#/components/parameters/indices.simulate_index_template___path.name' - - $ref: '#/components/parameters/indices.simulate_index_template___query.cause' - $ref: '#/components/parameters/indices.simulate_index_template___query.cluster_manager_timeout' - - $ref: '#/components/parameters/indices.simulate_index_template___query.create' - $ref: '#/components/parameters/indices.simulate_index_template___query.master_timeout' - $ref: '#/components/parameters/_global___query.pretty' - $ref: '#/components/parameters/_global___query.human' @@ -9487,6 +9487,7 @@ paths: operationId: indices.get_upgrade.0 x-operation-group: indices.get_upgrade x-version-added: '1.0' + x-version-deprecated: '1.0' description: The `_upgrade` API is no longer useful and will be removed. externalDocs: url: https://opensearch.org/docs/latest @@ -9506,6 +9507,7 @@ paths: operationId: indices.upgrade.0 x-operation-group: indices.upgrade x-version-added: '1.0' + x-version-deprecated: '1.0' description: The `_upgrade` API is no longer useful and will be removed. externalDocs: url: https://opensearch.org/docs/latest @@ -9520,6 +9522,8 @@ paths: - $ref: '#/components/parameters/_global___query.error_trace' - $ref: '#/components/parameters/_global___query.source' - $ref: '#/components/parameters/_global___query.filter_path' + requestBody: + $ref: '#/components/requestBodies/indices.upgrade' responses: '200': $ref: '#/components/responses/indices.upgrade___200' @@ -12217,6 +12221,7 @@ paths: operationId: indices.get_upgrade.1 x-operation-group: indices.get_upgrade x-version-added: '1.0' + x-version-deprecated: '1.0' description: The `_upgrade` API is no longer useful and will be removed. externalDocs: url: https://opensearch.org/docs/latest @@ -12237,6 +12242,7 @@ paths: operationId: indices.upgrade.1 x-operation-group: indices.upgrade x-version-added: '1.0' + x-version-deprecated: '1.0' description: The `_upgrade` API is no longer useful and will be removed. externalDocs: url: https://opensearch.org/docs/latest @@ -12252,6 +12258,8 @@ paths: - $ref: '#/components/parameters/_global___query.error_trace' - $ref: '#/components/parameters/_global___query.source' - $ref: '#/components/parameters/_global___query.filter_path' + requestBody: + $ref: '#/components/requestBodies/indices.upgrade' responses: '200': $ref: '#/components/responses/indices.upgrade___200' @@ -14824,13 +14832,13 @@ components: asynchronous_search.search___query.index: name: index in: query - description: The name of the index to be searched. + description: The name of the index to be searched. Can be an individual name, a comma-separated list of indexes, or a wildcard expression of index names. schema: type: string asynchronous_search.search___query.keep_alive: name: keep_alive in: query - description: The amount of time that the result is saved in the cluster. + description: The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query overruns this time, the process cancels this query automatically. schema: type: string asynchronous_search.search___query.keep_on_completion: @@ -14842,7 +14850,7 @@ components: asynchronous_search.search___query.wait_for_completion_timeout: name: wait_for_completion_timeout in: query - description: The amount of time that you plan to wait for the results. + description: The amount of time that you plan to wait for the results. You can poll the remaining results based on an ID. The maximum value is `300s`. Default is `1s`. schema: type: string bulk_stream___path.index: @@ -16585,6 +16593,17 @@ components: x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use `cluster_manager_timeout` instead. deprecated: true + cat.snapshots___query.repository: + in: query + name: repository + description: |- + A comma-separated list of snapshot repositories used to limit the request. + Accepts wildcard expressions. + `_all` returns all repositories. + If any repository fails during the request, OpenSearch returns an error. + required: true + schema: + $ref: '#/components/schemas/_common___Names' cat.snapshots___query.s: name: s in: query @@ -21163,14 +21182,6 @@ components: schema: $ref: '#/components/schemas/_common___Name' style: simple - indices.simulate_index_template___query.cause: - name: cause - in: query - description: User defined reason for dry-run creating the new template for simulation purposes. - schema: - type: string - default: 'false' - description: User defined reason for dry-run creating the new template for simulation purposes. indices.simulate_index_template___query.cluster_manager_timeout: name: cluster_manager_timeout in: query @@ -21178,19 +21189,6 @@ components: schema: $ref: '#/components/schemas/_common___Duration' x-version-added: '2.0' - indices.simulate_index_template___query.create: - in: query - name: create - description: |- - If `true`, the template passed in the body is only used if no existing - templates match the same index patterns. If `false`, the simulation uses - the template with the highest priority. Note that the template is not - permanently added or updated in either case; it is only used for the - simulation. - schema: - type: boolean - default: false - style: form indices.simulate_index_template___query.master_timeout: in: query name: master_timeout @@ -26557,12 +26555,12 @@ components: Templates with lower 'order' values are merged first. Templates with higher 'order' values are merged later, overriding templates with lower values. - type: number + type: integer + format: int32 settings: description: Configuration options for the index. type: object - additionalProperties: - type: object + additionalProperties: true version: $ref: '#/components/schemas/_common___VersionNumber' description: The template definition @@ -26682,6 +26680,11 @@ components: $ref: '#/components/schemas/indices.update_aliases___Action' description: The definition of `actions` to perform required: true + indices.upgrade: + content: + application/json: + schema: + $ref: '#/components/schemas/indices._common___UpgradeRequest' indices.validate_query: content: application/json: @@ -29201,6 +29204,10 @@ components: $ref: '#/components/schemas/indices._common___TemplateMapping' description: '' indices.get_upgrade___200: + content: + application/json: + schema: + $ref: '#/components/schemas/indices._common___IndexGetUpgradeStatus' description: '' indices.get___200: content: @@ -29438,6 +29445,10 @@ components: $ref: '#/components/schemas/_common___AcknowledgedResponseBase' description: '' indices.upgrade___200: + content: + application/json: + schema: + $ref: '#/components/schemas/indices._common___IndexPostUpgradeStatus' description: '' indices.validate_query___200: content: @@ -30360,7 +30371,10 @@ components: type: object properties: result: - type: object + oneOf: + - type: number + - type: string + - type: boolean required: - result description: '' @@ -30464,6 +30478,8 @@ components: $ref: '#/components/schemas/_core.search___Suggest' terminated_early: type: boolean + status: + type: number required: - _shards - hits @@ -31927,17 +31943,34 @@ components: _common___Distance: type: string _common___DistanceUnit: - type: string - enum: - - cm - - ft - - in - - km - - m - - mi - - mm - - nmi - - yd + oneOf: + - title: centimeters + type: string + const: cm + - title: feet + type: string + const: ft + - title: inches + type: string + const: in + - title: kilometers + type: string + const: km + - title: meters + type: string + const: m + - title: miles + type: string + const: mi + - title: millimeters + type: string + const: mm + - title: nautical miles + type: string + const: nmi + - title: yards + type: string + const: yd _common___DocStats: type: object properties: @@ -32098,22 +32131,40 @@ components: $ref: '#/components/schemas/_common___ByteCount' required: - size_in_bytes + _common___FieldSort: + oneOf: + - title: order + $ref: '#/components/schemas/_common___SortOrder' + - type: object + properties: + missing: + $ref: '#/components/schemas/_common___FieldValue' + mode: + $ref: '#/components/schemas/_common___SortMode' + nested: + $ref: '#/components/schemas/_common___NestedSortValue' + order: + $ref: '#/components/schemas/_common___SortOrder' + unmapped_type: + $ref: '#/components/schemas/_common.mapping___FieldType' + numeric_type: + $ref: '#/components/schemas/_common___FieldSortNumericType' + format: + type: string + _common___FieldSortNumericType: + type: string + enum: + - date + - date_nanos + - double + - long _common___FieldValue: description: A field value. type: - boolean - 'null' - number - - object - string - _common___FieldWithDirection: - type: object - additionalProperties: - $ref: '#/components/schemas/_common___SortOrder' - _common___FieldWithOrder: - type: object - additionalProperties: - $ref: '#/components/schemas/_common___ScoreSort' _common___FlushStats: type: object properties: @@ -32447,50 +32498,6 @@ components: - source _common___Ip: type: string - _common___KnnField: - type: object - properties: - vector: - $ref: '#/components/schemas/_common___QueryVector' - k: - description: The total number of nearest neighbors to return as top hits. - type: integer - format: int32 - min_score: - description: The minimum similarity score required in order for a neighbor to be considered a hit. - type: number - format: float - x-version-added: '2.14' - max_distance: - description: The maximum physical vector space distance required in order for a neighbor to be considered a hit. - type: number - format: float - x-version-added: '2.14' - filter: - description: The filters for the k-NN search query. - oneOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryContainer' - - type: array - items: - $ref: '#/components/schemas/_common.query_dsl___QueryContainer' - boost: - description: The boost value applied to k-NN scores. - type: number - format: float - method_parameters: - type: object - x-version-added: '2.16' - additionalProperties: - type: integer - format: int32 - rescore: - type: object - x-version-added: '2.17' - additionalProperties: - type: number - format: float - required: - - vector _common___LatLonGeoLocation: type: object properties: @@ -32569,14 +32576,14 @@ components: format: int32 - type: string _common___MultiTermQueryRewrite: - type: string - enum: - - constant_score - - constant_score_boolean - - scoring_boolean - - top_terms_N - - top_terms_blended_freqs_N - - top_terms_boost_N + oneOf: + - type: string + enum: + - constant_score + - constant_score_boolean + - scoring_boolean + - type: string + pattern: top_terms(_blended_freqs|_boost)?_\d+ _common___Name: type: string _common___Names: @@ -32790,16 +32797,6 @@ components: - query _common___PipelineName: type: string - _common___PipeSeparatedFlagsSimpleQueryStringFlag: - description: |- - A set of flags represented as a single enum value or a set of values that are encoded - as a pipe-separated string. - - Depending on the target language, code generators can use this hint to generate language specific - flags enum constructs and the corresponding (de-)serialization code. - oneOf: - - $ref: '#/components/schemas/_common.query_dsl___SimpleQueryStringFlag' - - type: string _common___PluginStats: type: object properties: @@ -32872,11 +32869,6 @@ components: - memory_size_in_bytes - miss_count - total_count - _common___QueryVector: - type: array - items: - type: number - format: float _common___RankBase: type: object _common___RankContainer: @@ -33140,6 +33132,35 @@ components: type: number total: type: number + _common___ResourceStat: + type: object + properties: + cpu_time_in_nanos: + $ref: '#/components/schemas/_common___DurationValueUnitNanos' + memory_in_bytes: + $ref: '#/components/schemas/_common___ByteCount' + required: + - cpu_time_in_nanos + - memory_in_bytes + _common___ResourceStats: + type: object + properties: + average: + $ref: '#/components/schemas/_common___ResourceStat' + total: + $ref: '#/components/schemas/_common___ResourceStat' + min: + $ref: '#/components/schemas/_common___ResourceStat' + max: + $ref: '#/components/schemas/_common___ResourceStat' + thread_info: + $ref: '#/components/schemas/_common___ThreadInfo' + required: + - average + - max + - min + - thread_info + - total _common___ResourceType: type: string enum: @@ -33555,20 +33576,10 @@ components: - auto _common___Sort: oneOf: - - $ref: '#/components/schemas/_common___SortCombinations' + - $ref: '#/components/schemas/_common___SortOptions' - type: array items: - $ref: '#/components/schemas/_common___SortCombinations' - _common___SortCombinations: - oneOf: - - title: field - $ref: '#/components/schemas/_common___Field' - - title: field_with_direction - $ref: '#/components/schemas/_common___FieldWithDirection' - - title: field_with_order - $ref: '#/components/schemas/_common___FieldWithOrder' - - title: options - $ref: '#/components/schemas/_common___SortOptions' + $ref: '#/components/schemas/_common___SortOptions' _common___SortMode: type: string enum: @@ -33578,18 +33589,44 @@ components: - min - sum _common___SortOptions: - type: object - properties: - _score: - $ref: '#/components/schemas/_common___ScoreSort' - _doc: - $ref: '#/components/schemas/_common___ScoreSort' - _geo_distance: - $ref: '#/components/schemas/_common___GeoDistanceSort' - _script: - $ref: '#/components/schemas/_common___ScriptSort' - minProperties: 1 - maxProperties: 1 + oneOf: + - type: string + const: _score + - type: string + const: _doc + - type: string + not: + type: string + enum: + - _doc + - _score + - type: object + properties: + _score: + $ref: '#/components/schemas/_common___ScoreSort' + _doc: + $ref: '#/components/schemas/_common___ScoreSort' + _geo_distance: + $ref: '#/components/schemas/_common___GeoDistanceSort' + _script: + $ref: '#/components/schemas/_common___ScriptSort' + minProperties: 1 + maxProperties: 1 + - type: object + propertyNames: + allOf: + - $ref: '#/components/schemas/_common___Field' + - not: + type: string + enum: + - _doc + - _geo_distance + - _score + - _script + additionalProperties: + $ref: '#/components/schemas/_common___FieldSort' + minProperties: 1 + maxProperties: 1 _common___SortOrder: type: string enum: @@ -33733,6 +33770,16 @@ components: - h3 - 'no' - z + _common___ThreadInfo: + type: object + properties: + thread_executions: + type: number + active_threads: + type: number + required: + - active_threads + - thread_executions _common___TimeOfDay: description: Time of day, expressed as HH:MM:SS. type: string @@ -39687,6 +39734,55 @@ components: type: boolean required: - enabled + _common.mapping___FieldType: + type: string + enum: + - aggregate_metric_double + - alias + - binary + - boolean + - byte + - completion + - constant_keyword + - date + - date_nanos + - date_range + - double + - double_range + - flat_object + - float + - float_range + - geo_point + - geo_shape + - half_float + - histogram + - icu_collation_keyword + - integer + - integer_range + - ip + - ip_range + - join + - keyword + - knn_vector + - long + - long_range + - match_only_text + - murmur3 + - nested + - object + - percolator + - rank_feature + - rank_features + - scaled_float + - search_as_you_type + - short + - text + - token_count + - unsigned_long + - version + - wildcard + - xy_point + - xy_shape _common.mapping___FlatObjectProperty: allOf: - $ref: '#/components/schemas/_common.mapping___PropertyBase' @@ -40650,25 +40746,28 @@ components: - all - none _common.query_dsl___CommonTermsQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - analyzer: - type: string - cutoff_frequency: - type: number - format: float - high_freq_operator: - $ref: '#/components/schemas/_common.query_dsl___Operator' - low_freq_operator: - $ref: '#/components/schemas/_common.query_dsl___Operator' - minimum_should_match: - $ref: '#/components/schemas/_common___MinimumShouldMatch' - query: - type: string - required: - - query + oneOf: + - title: query + type: string + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + analyzer: + type: string + cutoff_frequency: + type: number + format: float + high_freq_operator: + $ref: '#/components/schemas/_common.query_dsl___Operator' + low_freq_operator: + $ref: '#/components/schemas/_common.query_dsl___Operator' + minimum_should_match: + $ref: '#/components/schemas/_common___MinimumShouldMatch' + query: + type: string + required: + - query _common.query_dsl___ConstantScoreQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -40784,17 +40883,20 @@ components: required: - field _common.query_dsl___FieldAndFormat: - type: object - properties: - field: + oneOf: + - title: field $ref: '#/components/schemas/_common___Field' - format: - description: Format in which the values are returned. - type: string - include_unmapped: - type: boolean - required: - - field + - type: object + properties: + field: + $ref: '#/components/schemas/_common___Field' + format: + description: Format in which the values are returned. + type: string + include_unmapped: + type: boolean + required: + - field _common.query_dsl___FieldValueFactorModifier: type: string enum: @@ -40895,33 +40997,33 @@ components: score_mode: $ref: '#/components/schemas/_common.query_dsl___FunctionScoreMode' _common.query_dsl___FuzzyQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - max_expansions: - description: Maximum number of variations created. - type: integer - format: int32 - prefix_length: - description: Number of beginning characters left unchanged when creating expansions. - type: integer - format: int32 - rewrite: - $ref: '#/components/schemas/_common___MultiTermQueryRewrite' - transpositions: - description: Indicates whether edits include transpositions of two adjacent characters (for example, `ab` to `ba`). - type: boolean - fuzziness: - $ref: '#/components/schemas/_common___Fuzziness' - value: - description: Term you wish to find in the provided field. - oneOf: - - type: string - - type: number - - type: boolean - required: - - value + oneOf: + - title: value + $ref: '#/components/schemas/_common___FieldValue' + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + max_expansions: + description: Maximum number of variations created. + type: integer + format: int32 + prefix_length: + description: Number of beginning characters left unchanged when creating expansions. + type: integer + format: int32 + rewrite: + $ref: '#/components/schemas/_common___MultiTermQueryRewrite' + transpositions: + description: Indicates whether edits include transpositions of two adjacent characters (for example, `ab` to `ba`). + type: boolean + fuzziness: + $ref: '#/components/schemas/_common___Fuzziness' + value: + description: Term you wish to find in the provided field. + $ref: '#/components/schemas/_common___FieldValue' + required: + - value _common.query_dsl___GeoBoundingBoxQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -41061,6 +41163,15 @@ components: required: - parent_type - query + _common.query_dsl___HybridQuery: + allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + queries: + type: array + items: + $ref: '#/components/schemas/_common.query_dsl___QueryContainer' _common.query_dsl___IdsQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -41241,22 +41352,59 @@ components: required: - pattern _common.query_dsl___KnnQuery: - type: object - additionalProperties: - $ref: '#/components/schemas/_common___KnnField' - minProperties: 1 - maxProperties: 1 + allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + vector: + $ref: '#/components/schemas/_common.query_dsl___QueryVector' + k: + description: The total number of nearest neighbors to return as top hits. + type: integer + format: int32 + min_score: + description: The minimum similarity score required in order for a neighbor to be considered a hit. + type: number + format: float + x-version-added: '2.14' + max_distance: + description: The maximum physical vector space distance required in order for a neighbor to be considered a hit. + type: number + format: float + x-version-added: '2.14' + filter: + description: The filters for the k-NN search query. + oneOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryContainer' + - type: array + items: + $ref: '#/components/schemas/_common.query_dsl___QueryContainer' + method_parameters: + type: object + x-version-added: '2.16' + additionalProperties: + type: integer + format: int32 + rescore: + type: object + x-version-added: '2.17' + additionalProperties: + type: number + format: float + required: + - vector _common.query_dsl___Like: description: Text that we want similar documents for or a lookup to a document's field for the text. oneOf: - - type: string - - $ref: '#/components/schemas/_common.query_dsl___LikeDocument' + - title: text + type: string + - title: document + $ref: '#/components/schemas/_common.query_dsl___LikeDocument' _common.query_dsl___LikeDocument: type: object properties: doc: description: A document not present in the index. - type: object fields: type: array items: @@ -41265,6 +41413,8 @@ components: $ref: '#/components/schemas/_common___Id' _index: $ref: '#/components/schemas/_common___IndexName' + _type: + $ref: '#/components/schemas/_common___Type' per_field_analyzer: type: object additionalProperties: @@ -41276,140 +41426,152 @@ components: version_type: $ref: '#/components/schemas/_common___VersionType' _common.query_dsl___MatchAllQuery: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - _common.query_dsl___MatchBoolPrefixQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - type: object - properties: - analyzer: - description: Analyzer used to convert the text in the query value into tokens. - type: string - fuzziness: - $ref: '#/components/schemas/_common___Fuzziness' - fuzzy_rewrite: - $ref: '#/components/schemas/_common___MultiTermQueryRewrite' - fuzzy_transpositions: - description: |- - 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. - type: boolean - max_expansions: - description: |- - Maximum number of terms to which the query will expand. - Can be applied to the term subqueries constructed for all terms but the final term. - type: integer - format: int32 - minimum_should_match: - $ref: '#/components/schemas/_common___MinimumShouldMatch' - operator: - $ref: '#/components/schemas/_common.query_dsl___Operator' - prefix_length: - description: |- - Number of beginning characters left unchanged for fuzzy matching. - Can be applied to the term subqueries constructed for all terms but the final term. - type: integer - format: int32 - query: - description: |- - Terms you wish to find in the provided field. - The last term is used in a prefix query. - type: string - required: - - query + properties: {} + _common.query_dsl___MatchBoolPrefixQuery: + oneOf: + - title: query + type: string + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + analyzer: + description: Analyzer used to convert the text in the query value into tokens. + type: string + fuzziness: + $ref: '#/components/schemas/_common___Fuzziness' + fuzzy_rewrite: + $ref: '#/components/schemas/_common___MultiTermQueryRewrite' + fuzzy_transpositions: + description: |- + 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. + type: boolean + max_expansions: + description: |- + Maximum number of terms to which the query will expand. + Can be applied to the term subqueries constructed for all terms but the final term. + type: integer + format: int32 + minimum_should_match: + $ref: '#/components/schemas/_common___MinimumShouldMatch' + operator: + $ref: '#/components/schemas/_common.query_dsl___Operator' + prefix_length: + description: |- + Number of beginning characters left unchanged for fuzzy matching. + Can be applied to the term subqueries constructed for all terms but the final term. + type: integer + format: int32 + query: + description: |- + Terms you wish to find in the provided field. + The last term is used in a prefix query. + type: string + required: + - query _common.query_dsl___MatchNoneQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - type: object _common.query_dsl___MatchPhrasePrefixQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - analyzer: - description: Analyzer used to convert text in the query value into tokens. - type: string - max_expansions: - description: Maximum number of terms to which the last provided term of the query value will expand. - type: integer - format: int32 - query: - description: Text you wish to find in the provided field. - type: string - slop: - description: Maximum number of positions allowed between matching tokens. - type: integer - format: int32 - zero_terms_query: - $ref: '#/components/schemas/_common.query_dsl___ZeroTermsQuery' - required: - - query + oneOf: + - title: query + type: string + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + analyzer: + description: Analyzer used to convert text in the query value into tokens. + type: string + max_expansions: + description: Maximum number of terms to which the last provided term of the query value will expand. + type: integer + format: int32 + query: + description: Text you wish to find in the provided field. + type: string + slop: + description: Maximum number of positions allowed between matching tokens. + type: integer + format: int32 + zero_terms_query: + $ref: '#/components/schemas/_common.query_dsl___ZeroTermsQuery' + required: + - query _common.query_dsl___MatchPhraseQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - analyzer: - description: Analyzer used to convert the text in the query value into tokens. - type: string - query: - description: Query terms that are analyzed and turned into a phrase query. - type: string - slop: - description: Maximum number of positions allowed between matching tokens. - type: integer - format: int32 - zero_terms_query: - $ref: '#/components/schemas/_common.query_dsl___ZeroTermsQuery' - required: - - query + oneOf: + - title: query + type: string + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + analyzer: + description: Analyzer used to convert the text in the query value into tokens. + type: string + query: + description: Query terms that are analyzed and turned into a phrase query. + type: string + slop: + description: Maximum number of positions allowed between matching tokens. + type: integer + format: int32 + zero_terms_query: + $ref: '#/components/schemas/_common.query_dsl___ZeroTermsQuery' + required: + - query _common.query_dsl___MatchQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - analyzer: - description: Analyzer used to convert the text in the query value into tokens. - type: string - auto_generate_synonyms_phrase_query: - description: If `true`, match phrase queries are automatically created for multi-term synonyms. - type: boolean - cutoff_frequency: - deprecated: true - type: number - format: float - fuzziness: - $ref: '#/components/schemas/_common___Fuzziness' - fuzzy_rewrite: - $ref: '#/components/schemas/_common___MultiTermQueryRewrite' - fuzzy_transpositions: - description: If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`). - type: boolean - lenient: - description: If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored. - type: boolean - max_expansions: - description: Maximum number of terms to which the query will expand. - type: integer - format: int32 - minimum_should_match: - $ref: '#/components/schemas/_common___MinimumShouldMatch' - operator: - $ref: '#/components/schemas/_common.query_dsl___Operator' - prefix_length: - description: Number of beginning characters left unchanged for fuzzy matching. - type: integer - format: int32 - query: - description: Text, number, Boolean value or date you wish to find in the provided field. - oneOf: - - type: string - - type: number - - type: boolean - zero_terms_query: - $ref: '#/components/schemas/_common.query_dsl___ZeroTermsQuery' - required: - - query + oneOf: + - title: query + $ref: '#/components/schemas/_common___FieldValue' + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + analyzer: + description: Analyzer used to convert the text in the query value into tokens. + type: string + auto_generate_synonyms_phrase_query: + description: If `true`, match phrase queries are automatically created for multi-term synonyms. + type: boolean + cutoff_frequency: + deprecated: true + type: number + format: float + fuzziness: + $ref: '#/components/schemas/_common___Fuzziness' + fuzzy_rewrite: + $ref: '#/components/schemas/_common___MultiTermQueryRewrite' + fuzzy_transpositions: + description: If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`). + type: boolean + lenient: + description: If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored. + type: boolean + max_expansions: + description: Maximum number of terms to which the query will expand. + type: integer + format: int32 + minimum_should_match: + $ref: '#/components/schemas/_common___MinimumShouldMatch' + operator: + $ref: '#/components/schemas/_common.query_dsl___Operator' + prefix_length: + description: Number of beginning characters left unchanged for fuzzy matching. + type: integer + format: int32 + query: + description: Text, number, Boolean value or date you wish to find in the provided field. + $ref: '#/components/schemas/_common___FieldValue' + zero_terms_query: + $ref: '#/components/schemas/_common.query_dsl___ZeroTermsQuery' + required: + - query _common.query_dsl___MoreLikeThisQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -41585,28 +41747,24 @@ components: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - type: object - additionalProperties: - $ref: '#/components/schemas/_common.query_dsl___NeuralQueryVectorField' - _common.query_dsl___NeuralQueryVectorField: - type: object - properties: - query_text: - type: string - query_image: - type: string - contentEncoding: base64 - model_id: - type: string - k: - type: integer - min_score: - type: number - format: float - max_distance: - type: number - format: float - filter: - $ref: '#/components/schemas/_common.query_dsl___QueryContainer' + properties: + query_text: + type: string + query_image: + type: string + contentEncoding: base64 + model_id: + type: string + k: + type: integer + min_score: + type: number + format: float + max_distance: + type: number + format: float + filter: + $ref: '#/components/schemas/_common.query_dsl___QueryContainer' _common.query_dsl___NumberRangeQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___RangeQueryBase' @@ -41642,7 +41800,9 @@ components: type: string enum: - and + - AND - or + - OR _common.query_dsl___ParentIdQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -41662,12 +41822,10 @@ components: properties: document: description: The source of the document being percolated. - type: object documents: description: An array of sources of the documents being percolated. type: array - items: - type: object + items: {} field: $ref: '#/components/schemas/_common___Field' id: @@ -41725,22 +41883,25 @@ components: minProperties: 1 maxProperties: 1 _common.query_dsl___PrefixQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - rewrite: - $ref: '#/components/schemas/_common___MultiTermQueryRewrite' - value: - description: Beginning characters of terms you wish to find in the provided field. - type: string - case_insensitive: - description: |- - Allows ASCII case insensitive matching of the value 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. - type: boolean - required: - - value + oneOf: + - title: value + type: string + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + rewrite: + $ref: '#/components/schemas/_common___MultiTermQueryRewrite' + value: + description: Beginning characters of terms you wish to find in the provided field. + type: string + case_insensitive: + description: |- + Allows ASCII case insensitive matching of the value 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. + type: boolean + required: + - value _common.query_dsl___QueryBase: type: object properties: @@ -41764,6 +41925,8 @@ components: common: deprecated: true type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___CommonTermsQuery' minProperties: 1 @@ -41783,6 +41946,8 @@ components: fuzzy: description: Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___FuzzyQuery' minProperties: 1 @@ -41799,26 +41964,36 @@ components: $ref: '#/components/schemas/_common.query_dsl___HasChildQuery' has_parent: $ref: '#/components/schemas/_common.query_dsl___HasParentQuery' + hybrid: + $ref: '#/components/schemas/_common.query_dsl___HybridQuery' ids: $ref: '#/components/schemas/_common.query_dsl___IdsQuery' intervals: description: Returns documents based on the order and proximity of matching terms. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___IntervalsQuery' minProperties: 1 maxProperties: 1 knn: - $ref: '#/components/schemas/_common.query_dsl___KnnQuery' + type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' + additionalProperties: + $ref: '#/components/schemas/_common.query_dsl___KnnQuery' + minProperties: 1 + maxProperties: 1 match: description: |- Returns documents that match a provided text, number, date or Boolean value. The provided text is analyzed before matching. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: - anyOf: - - $ref: '#/components/schemas/_common.query_dsl___MatchQuery' - - {} + $ref: '#/components/schemas/_common.query_dsl___MatchQuery' minProperties: 1 maxProperties: 1 match_all: @@ -41829,6 +42004,8 @@ components: Each term except the last is used in a `term` query. The last term is used in a prefix query. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___MatchBoolPrefixQuery' minProperties: 1 @@ -41838,6 +42015,8 @@ components: match_phrase: description: Analyzes the text and creates a phrase query out of the analyzed text. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___MatchPhraseQuery' minProperties: 1 @@ -41847,6 +42026,8 @@ components: 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. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___MatchPhrasePrefixQuery' minProperties: 1 @@ -41858,7 +42039,13 @@ components: nested: $ref: '#/components/schemas/_common.query_dsl___NestedQuery' neural: - $ref: '#/components/schemas/_common.query_dsl___NeuralQuery' + type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' + additionalProperties: + $ref: '#/components/schemas/_common.query_dsl___NeuralQuery' + minProperties: 1 + maxProperties: 1 parent_id: $ref: '#/components/schemas/_common.query_dsl___ParentIdQuery' percolate: @@ -41868,6 +42055,8 @@ components: prefix: description: Returns documents that contain a specific prefix in a provided field. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___PrefixQuery' minProperties: 1 @@ -41877,6 +42066,8 @@ components: range: description: Returns documents that contain terms within a provided range. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___RangeQuery' minProperties: 1 @@ -41886,12 +42077,12 @@ components: regexp: description: Returns documents that contain terms matching a regular expression. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___RegexpQuery' minProperties: 1 maxProperties: 1 - rule_query: - $ref: '#/components/schemas/_common.query_dsl___RuleQuery' script: $ref: '#/components/schemas/_common.query_dsl___ScriptQuery' script_score: @@ -41915,6 +42106,8 @@ components: span_term: description: Matches spans containing a term. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___SpanTermQuery' minProperties: 1 @@ -41926,43 +42119,33 @@ components: 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. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: - anyOf: - - $ref: '#/components/schemas/_common.query_dsl___TermQuery' - - $ref: '#/components/schemas/_common___FieldValue' + $ref: '#/components/schemas/_common.query_dsl___TermQuery' minProperties: 1 maxProperties: 1 terms: description: Returns documents that contain one or more exact terms in a provided field. - $ref: '#/components/schemas/_common.query_dsl___TermsQueryField' + $ref: '#/components/schemas/_common.query_dsl___TermsQuery' terms_set: description: |- 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. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___TermsSetQuery' minProperties: 1 maxProperties: 1 - text_expansion: - description: Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field. - type: object - additionalProperties: - $ref: '#/components/schemas/_common.query_dsl___TextExpansionQuery' - minProperties: 1 - maxProperties: 1 type: $ref: '#/components/schemas/_common.query_dsl___TypeQuery' - weighted_tokens: - description: Supports returning `text_expansion` query results by sending in precomputed tokens with the query. - type: object - additionalProperties: - $ref: '#/components/schemas/_common.query_dsl___WeightedTokensQuery' - minProperties: 1 - maxProperties: 1 wildcard: description: Returns documents that contain terms matching a wildcard pattern. type: object + propertyNames: + $ref: '#/components/schemas/_common___Field' additionalProperties: $ref: '#/components/schemas/_common.query_dsl___WildcardQuery' minProperties: 1 @@ -42057,6 +42240,11 @@ components: $ref: '#/components/schemas/_common.query_dsl___TextQueryType' required: - query + _common.query_dsl___QueryVector: + type: array + items: + type: number + format: float _common.query_dsl___RandomScoreFunction: type: object properties: @@ -42144,44 +42332,32 @@ components: required: - field _common.query_dsl___RegexpQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - case_insensitive: - description: |- - Allows case insensitive matching of the regular expression value with the indexed field values when set to `true`. - When `false`, case sensitivity of matching depends on the underlying field's mapping. - type: boolean - flags: - description: Enables optional operators for the regular expression. - type: string - max_determinized_states: - description: Maximum number of automaton states required for the query. - type: integer - format: int32 - rewrite: - $ref: '#/components/schemas/_common___MultiTermQueryRewrite' - value: - description: Regular expression for terms you wish to find in the provided field. - type: string - required: - - value - _common.query_dsl___RuleQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - organic: - $ref: '#/components/schemas/_common.query_dsl___QueryContainer' - ruleset_id: - $ref: '#/components/schemas/_common___Id' - match_criteria: - type: object - required: - - match_criteria - - organic - - ruleset_id + oneOf: + - title: value + type: string + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + case_insensitive: + description: |- + Allows case insensitive matching of the regular expression value with the indexed field values when set to `true`. + When `false`, case sensitivity of matching depends on the underlying field's mapping. + type: boolean + flags: + description: Enables optional operators for the regular expression. + type: string + max_determinized_states: + description: Maximum number of automaton states required for the query. + type: integer + format: int32 + rewrite: + $ref: '#/components/schemas/_common___MultiTermQueryRewrite' + value: + description: Regular expression for terms you wish to find in the provided field. + type: string + required: + - value _common.query_dsl___ScriptQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -42232,8 +42408,11 @@ components: - WHITESPACE _common.query_dsl___SimpleQueryStringFlags: description: Query flags can be either a single flag or a combination of flags (e.g. `OR|AND|PREFIX`). - allOf: - - $ref: '#/components/schemas/_common___PipeSeparatedFlagsSimpleQueryStringFlag' + oneOf: + - title: single + $ref: '#/components/schemas/_common.query_dsl___SimpleQueryStringFlag' + - title: multiple + type: string _common.query_dsl___SimpleQueryStringQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -42428,14 +42607,17 @@ components: minProperties: 1 maxProperties: 1 _common.query_dsl___SpanTermQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - value: - type: string - required: - - value + oneOf: + - title: value + type: string + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + value: + type: string + required: + - value _common.query_dsl___SpanWithinQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -42449,20 +42631,23 @@ components: - big - little _common.query_dsl___TermQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - value: - $ref: '#/components/schemas/_common___FieldValue' - case_insensitive: - description: |- - Allows ASCII case insensitive matching of the value with the indexed field values when set to `true`. - When `false`, the case sensitivity of matching depends on the underlying field's mapping. - type: boolean - required: - - value - _common.query_dsl___TermsLookupField: + oneOf: + - title: value + $ref: '#/components/schemas/_common___FieldValue' + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + value: + $ref: '#/components/schemas/_common___FieldValue' + case_insensitive: + description: |- + Allows ASCII case insensitive matching of the value with the indexed field values when set to `true`. + When `false`, the case sensitivity of matching depends on the underlying field's mapping. + type: boolean + required: + - value + _common.query_dsl___TermsLookup: type: object properties: index: @@ -42473,22 +42658,24 @@ components: $ref: '#/components/schemas/_common___Field' routing: $ref: '#/components/schemas/_common___Routing' + _common.query_dsl___TermsQuery: + allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + _name: {} + boost: {} + additionalProperties: + $ref: '#/components/schemas/_common.query_dsl___TermsQueryField' + minProperties: 1 _common.query_dsl___TermsQueryField: - type: object - properties: - boost: - description: |- - A floating-point value that specifies the weight of this field toward the relevance score. - Values above 1.0 increase the field’s relevance. Values between 0.0 and 1.0 decrease the field’s relevance. - Default is 1.0. - type: number - format: float - additionalProperties: - oneOf: - - $ref: '#/components/schemas/_common.query_dsl___TermsLookupField' - - type: array - items: - type: string + oneOf: + - title: value + type: array + items: + $ref: '#/components/schemas/_common___FieldValue' + - title: lookup + $ref: '#/components/schemas/_common.query_dsl___TermsLookup' _common.query_dsl___TermsSetQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -42504,22 +42691,6 @@ components: type: string required: - terms - _common.query_dsl___TextExpansionQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - model_id: - description: The text expansion NLP model to use - type: string - model_text: - description: The query text - type: string - pruning_config: - $ref: '#/components/schemas/_common.query_dsl___TokenPruningConfig' - required: - - model_id - - model_text _common.query_dsl___TextQueryType: type: string enum: @@ -42529,18 +42700,6 @@ components: - most_fields - phrase - phrase_prefix - _common.query_dsl___TokenPruningConfig: - type: object - properties: - tokens_freq_ratio_threshold: - description: Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned. - type: number - tokens_weight_threshold: - description: Tokens whose weight is less than this threshold are considered nonsignificant and pruned. - type: number - only_score_pruned_tokens: - description: Whether to only score pruned tokens, vs only scoring kept tokens. - type: boolean _common.query_dsl___TypeQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -42550,36 +42709,25 @@ components: type: string required: - value - _common.query_dsl___WeightedTokensQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - tokens: - description: The tokens representing this query - type: object - additionalProperties: - type: number - pruning_config: - $ref: '#/components/schemas/_common.query_dsl___TokenPruningConfig' - required: - - tokens _common.query_dsl___WildcardQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl___QueryBase' - - type: object - properties: - case_insensitive: - description: 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. - type: boolean - rewrite: - $ref: '#/components/schemas/_common___MultiTermQueryRewrite' - value: - description: Wildcard pattern for terms you wish to find in the provided field. Required, when wildcard is not set. - type: string - wildcard: - description: Wildcard pattern for terms you wish to find in the provided field. Required, when value is not set. - type: string + oneOf: + - title: value + type: string + - allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + case_insensitive: + description: 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. + type: boolean + rewrite: + $ref: '#/components/schemas/_common___MultiTermQueryRewrite' + value: + description: Wildcard pattern for terms you wish to find in the provided field. Required, when wildcard is not set. + type: string + wildcard: + description: Wildcard pattern for terms you wish to find in the provided field. Required, when value is not set. + type: string _common.query_dsl___WrapperQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -43277,6 +43425,8 @@ components: $ref: '#/components/schemas/_common___IndexName' _score: type: number + _type: + $ref: '#/components/schemas/_common___Type' required: - _id - _index @@ -43334,7 +43484,7 @@ components: additionalProperties: type: object additionalProperties: - type: object + type: number required: - hits - metric_details @@ -43588,7 +43738,6 @@ components: required: - document - index - - query _core.search_shards___ShardStoreIndex: type: object properties: @@ -43773,11 +43922,14 @@ components: - sentence - word _core.search___BuiltinHighlighterType: - type: string - enum: - - fvh - - plain - - unified + oneOf: + - type: string + const: plain + - title: fast_vector + type: string + const: fvh + - type: string + const: unified _core.search___Collector: type: object properties: @@ -43957,6 +44109,9 @@ components: type: boolean fragmenter: $ref: '#/components/schemas/_core.search___HighlighterFragmenter' + fragment_offset: + type: integer + format: int32 fragment_size: description: The size of the highlighted fragment in characters. type: integer @@ -43968,11 +44123,11 @@ components: max_fragment_length: type: integer format: int32 - max_analyzed_offset: + max_analyzer_offset: description: |- If set to a non-negative value, highlighting stops at this defined maximum limit. The rest of the text is not processed or highlighted, and no error is returned. - The `max_analyzed_offset` query setting does not override the `index.highlight.max_analyzed_offset` setting, which takes precedence when it is set to a lower value than the query setting. + The `max_analyzer_offset` query setting does not override the `index.highlight.max_analyzed_offset` setting, which takes precedence when it is set to a lower value than the query setting. type: integer format: int32 no_match_size: @@ -44052,9 +44207,6 @@ components: - $ref: '#/components/schemas/_core.search___HighlightBase' - type: object properties: - fragment_offset: - type: integer - format: int32 matched_fields: $ref: '#/components/schemas/_common___Fields' analyzer: @@ -44077,8 +44229,7 @@ components: $ref: '#/components/schemas/_core.explain___Explanation' fields: type: object - additionalProperties: - type: object + additionalProperties: true highlight: type: object additionalProperties: @@ -44182,7 +44333,7 @@ components: $ref: '#/components/schemas/_common___Sort' _source: $ref: '#/components/schemas/_core.search___SourceConfig' - stored_field: + stored_fields: $ref: '#/components/schemas/_common___Fields' track_scores: type: boolean @@ -44477,10 +44628,6 @@ components: oneOf: - title: fetch type: boolean - - title: includes - type: array - items: - $ref: '#/components/schemas/_common___Field' - title: filter $ref: '#/components/schemas/_core.search___SourceFilter' _core.search___SourceConfigParam: @@ -44491,12 +44638,15 @@ components: - type: boolean - $ref: '#/components/schemas/_common___Fields' _core.search___SourceFilter: - type: object - properties: - excludes: - $ref: '#/components/schemas/_common___Fields' - includes: + oneOf: + - title: includes $ref: '#/components/schemas/_common___Fields' + - type: object + properties: + excludes: + $ref: '#/components/schemas/_common___Fields' + includes: + $ref: '#/components/schemas/_common___Fields' _core.search___Suggest: oneOf: - $ref: '#/components/schemas/_core.search___CompletionSuggest' @@ -49082,6 +49232,19 @@ components: additionalProperties: title: metadata description: Additional details about the error. + indices._common___IndexGetUpgradeStatus: + type: object + properties: + size_in_bytes: + $ref: '#/components/schemas/_common___ByteCount' + size_to_upgrade_in_bytes: + $ref: '#/components/schemas/_common___ByteCount' + size_to_upgrade_ancient_in_bytes: + $ref: '#/components/schemas/_common___ByteCount' + indices: + type: object + additionalProperties: + $ref: '#/components/schemas/indices._common___UpgradeStatus' indices._common___IndexingPressure: type: object properties: @@ -49117,6 +49280,15 @@ components: properties: index: $ref: '#/components/schemas/indices._common___SlowlogThresholdLevels' + indices._common___IndexPostUpgradeStatus: + type: object + properties: + _shards: + $ref: '#/components/schemas/_common___ShardStatistics' + upgraded_indices: + type: object + additionalProperties: + $ref: '#/components/schemas/indices._common___UpgradeVersionStatus' indices._common___IndexRouting: type: object properties: @@ -50041,11 +50213,11 @@ components: mappings: $ref: '#/components/schemas/_common.mapping___TypeMapping' order: - type: number + type: integer + format: int32 settings: type: object - additionalProperties: - type: object + additionalProperties: true version: $ref: '#/components/schemas/_common___VersionNumber' required: @@ -50081,6 +50253,38 @@ components: $ref: '#/components/schemas/_common___HumanReadableByteCount' age: $ref: '#/components/schemas/_common___Duration' + indices._common___UpgradeRequest: + type: object + properties: + allow_no_indices: + type: boolean + expand_wildcards: + type: string + enum: + - all + - closed + - none + - open + ignore_unavailable: + type: boolean + wait_for_completion: + type: boolean + indices._common___UpgradeStatus: + type: object + properties: + size_in_bytes: + $ref: '#/components/schemas/_common___ByteCount' + size_to_upgrade_in_bytes: + $ref: '#/components/schemas/_common___ByteCount' + size_to_upgrade_ancient_in_bytes: + $ref: '#/components/schemas/_common___ByteCount' + indices._common___UpgradeVersionStatus: + type: object + properties: + upgrade_version: + $ref: '#/components/schemas/_common___VersionString' + oldest_lucene_segment_version: + $ref: '#/components/schemas/_common___VersionString' indices.add_block___IndicesBlockOptions: type: string enum: @@ -50767,7 +50971,6 @@ components: $ref: '#/components/schemas/indices._common___IndexSettings' required: - aliases - - mappings - settings indices.stats___AllIndicesStats: type: object @@ -53765,17 +53968,22 @@ components: description: Size of buffer pools in bytes. $ref: '#/components/schemas/_common___ByteCount' nodes._common___NodeReloadError: + allOf: + - $ref: '#/components/schemas/nodes._common___NodeReloadResponse' + - type: object + properties: + reload_exception: + $ref: '#/components/schemas/_common___ErrorCause' + nodes._common___NodeReloadResponse: type: object properties: name: $ref: '#/components/schemas/_common___Name' - reload_exception: - $ref: '#/components/schemas/_common___ErrorCause' required: - name nodes._common___NodeReloadResult: - oneOf: - - $ref: '#/components/schemas/nodes._common___Stats' + anyOf: + - $ref: '#/components/schemas/nodes._common___NodeReloadResponse' - $ref: '#/components/schemas/nodes._common___NodeReloadError' nodes._common___NodesResponseBase: type: object @@ -54936,8 +55144,7 @@ components: - name nodes.info___NodeInfoSettingsPlugins: type: object - additionalProperties: - $ref: '#/components/schemas/_common___FieldValue' + additionalProperties: true nodes.info___NodeInfoSettingsTransport: type: object properties: @@ -55174,6 +55381,7 @@ components: type: string enum: - _all + - aggregations - rest_actions nodes.usage___NodeUsage: type: object @@ -55191,8 +55399,6 @@ components: additionalProperties: type: object required: - - aggregations - - rest_actions - since - timestamp nodes.usage___ResponseBase: @@ -58022,6 +58228,8 @@ components: type: string parent_task_id: $ref: '#/components/schemas/_common___TaskId' + resource_stats: + $ref: '#/components/schemas/_common___ResourceStats' required: - action - cancellable diff --git a/src/OpenSearch.Net/_Generated/Api/Enums.cs b/src/OpenSearch.Net/_Generated/Api/Enums.cs index 97b31d7d4b..ac0b61fd46 100644 --- a/src/OpenSearch.Net/_Generated/Api/Enums.cs +++ b/src/OpenSearch.Net/_Generated/Api/Enums.cs @@ -254,8 +254,14 @@ public enum DefaultOperator [EnumMember(Value = "and")] And, + [EnumMember(Value = "AND")] + And, + [EnumMember(Value = "or")] Or, + + [EnumMember(Value = "OR")] + Or, } [Flags, StringEnum] @@ -631,11 +637,14 @@ public enum NodesStatsMetric [Flags, StringEnum] public enum NodesUsageMetric { + [EnumMember(Value = "aggregations")] + Aggregations = 1 << 0, + [EnumMember(Value = "rest_actions")] - RestActions = 1 << 0, + RestActions = 1 << 1, [EnumMember(Value = "_all")] - All = 1 << 1, + All = 1 << 2, } [StringEnum] @@ -994,7 +1003,9 @@ public static string GetStringValue(this DefaultOperator enumValue) => enumValue switch { DefaultOperator.And => "and", + DefaultOperator.And => "AND", DefaultOperator.Or => "or", + DefaultOperator.Or => "OR", _ => throw new ArgumentException( $"'{enumValue.ToString()}' is not a valid value for enum 'DefaultOperator'" ), @@ -1289,6 +1300,8 @@ public static string GetStringValue(this NodesUsageMetric enumValue) if ((enumValue & NodesUsageMetric.All) != 0) return "_all"; var list = new List(); + if ((enumValue & NodesUsageMetric.Aggregations) != 0) + list.Add("aggregations"); if ((enumValue & NodesUsageMetric.RestActions) != 0) list.Add("rest_actions"); return string.Join(",", list); diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.AsynchronousSearch.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.AsynchronousSearch.cs index c65f57f287..3e20738b99 100644 --- a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.AsynchronousSearch.cs +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.AsynchronousSearch.cs @@ -72,14 +72,21 @@ public partial class SearchRequestParameters : RequestParameters HttpMethod.POST; public override bool SupportsBody => true; - /// The name of the index to be searched. + /// + /// The name of the index to be searched. Can be an individual name, a comma-separated list of indexes, or a wildcard expression of index + /// names. + /// public string Index { get => Q("index"); set => Q("index", value); } - /// The amount of time that the result is saved in the cluster. + /// + /// The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 + /// hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution + /// time. If the query overruns this time, the process cancels this query automatically. + /// public string KeepAlive { get => Q("keep_alive"); @@ -93,7 +100,10 @@ public bool? KeepOnCompletion set => Q("keep_on_completion", value); } - /// The amount of time that you plan to wait for the results. + /// + /// The amount of time that you plan to wait for the results. You can poll the remaining results based on an ID. The maximum value is `300s`. + /// Default is `1s`. + /// public string WaitForCompletionTimeout { get => Q("wait_for_completion_timeout"); diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cat.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cat.cs index 5e98255f39..e2ab85c6d5 100644 --- a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cat.cs +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cat.cs @@ -1502,6 +1502,16 @@ public TimeSpan MasterTimeout set => Q("master_timeout", value); } + /// + /// A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. `_all` returns all repositories. + /// If any repository fails during the request, OpenSearch returns an error. + /// + public string[] Repository + { + get => Q("repository"); + set => Q("repository", value); + } + /// Comma-separated list of column names or column aliases to sort by. public string[] SortByColumns { diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Indices.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Indices.cs index f2ce506951..e326f6ff70 100644 --- a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Indices.cs +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Indices.cs @@ -1976,13 +1976,6 @@ public partial class SimulateIndexTemplateRequestParameters public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; - /// User defined reason for dry-run creating the new template for simulation purposes. - public string Cause - { - get => Q("cause"); - set => Q("cause", value); - } - /// Operation timeout for connection to cluster-manager node. /// Supported by OpenSearch servers of version 2.0.0 or greater. public TimeSpan ClusterManagerTimeout @@ -1991,17 +1984,6 @@ public TimeSpan ClusterManagerTimeout set => Q("cluster_manager_timeout", value); } - /// - /// If `true`, the template passed in the body is only used if no existing templates match the same index patterns. If `false`, the simulation - /// uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used - /// for the simulation. - /// - public bool? Create - { - get => Q("create"); - set => Q("create", value); - } - /// /// Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and /// returns an error. @@ -2237,7 +2219,7 @@ public TimeSpan Timeout public partial class UpgradeRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; - public override bool SupportsBody => false; + public override bool SupportsBody => true; /// /// Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Indices.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Indices.cs index 0647696ebb..0dc9c636d6 100644 --- a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Indices.cs +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Indices.cs @@ -1457,6 +1457,7 @@ public Task GetTemplateForAllAsync( /// GET on /_upgrade https://opensearch.org/docs/latest /// Request specific configuration such as querystring parameters & request specific connection settings. + [Obsolete("Deprecated in version 1.0.0: ")] public TResponse GetUpgradeForAll( GetUpgradeRequestParameters requestParameters = null ) @@ -1465,6 +1466,7 @@ public TResponse GetUpgradeForAll( /// GET on /_upgrade https://opensearch.org/docs/latest /// Request specific configuration such as querystring parameters & request specific connection settings. + [Obsolete("Deprecated in version 1.0.0: ")] [MapsApi("indices.get_upgrade", "")] public Task GetUpgradeForAllAsync( GetUpgradeRequestParameters requestParameters = null, @@ -1476,6 +1478,7 @@ public Task GetUpgradeForAllAsync( /// GET on /{index}/_upgrade https://opensearch.org/docs/latest /// Comma-separated list of indexes; use the special string `_all` or Indices.All to perform the operation on all indexes. /// Request specific configuration such as querystring parameters & request specific connection settings. + [Obsolete("Deprecated in version 1.0.0: ")] public TResponse GetUpgrade( string index, GetUpgradeRequestParameters requestParameters = null @@ -1491,6 +1494,7 @@ public TResponse GetUpgrade( /// GET on /{index}/_upgrade https://opensearch.org/docs/latest /// Comma-separated list of indexes; use the special string `_all` or Indices.All to perform the operation on all indexes. /// Request specific configuration such as querystring parameters & request specific connection settings. + [Obsolete("Deprecated in version 1.0.0: ")] [MapsApi("indices.get_upgrade", "index")] public Task GetUpgradeAsync( string index, @@ -2528,15 +2532,23 @@ public Task BulkAliasForAllAsync( ); /// POST on /_upgrade https://opensearch.org/docs/latest + /// /// Request specific configuration such as querystring parameters & request specific connection settings. - public TResponse UpgradeForAll(UpgradeRequestParameters requestParameters = null) + [Obsolete("Deprecated in version 1.0.0: ")] + public TResponse UpgradeForAll( + PostData body, + UpgradeRequestParameters requestParameters = null + ) where TResponse : class, IOpenSearchResponse, new() => - DoRequest(POST, "_upgrade", null, RequestParams(requestParameters)); + DoRequest(POST, "_upgrade", body, RequestParams(requestParameters)); /// POST on /_upgrade https://opensearch.org/docs/latest + /// /// Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi("indices.upgrade", "")] + [Obsolete("Deprecated in version 1.0.0: ")] + [MapsApi("indices.upgrade", "body")] public Task UpgradeForAllAsync( + PostData body, UpgradeRequestParameters requestParameters = null, CancellationToken ctx = default ) @@ -2545,31 +2557,37 @@ public Task UpgradeForAllAsync( POST, "_upgrade", ctx, - null, + body, RequestParams(requestParameters) ); /// POST on /{index}/_upgrade https://opensearch.org/docs/latest /// Comma-separated list of indexes; use the special string `_all` or Indices.All to perform the operation on all indexes. + /// /// Request specific configuration such as querystring parameters & request specific connection settings. + [Obsolete("Deprecated in version 1.0.0: ")] public TResponse Upgrade( string index, + PostData body, UpgradeRequestParameters requestParameters = null ) where TResponse : class, IOpenSearchResponse, new() => DoRequest( POST, Url($"{index:index}/_upgrade"), - null, + body, RequestParams(requestParameters) ); /// POST on /{index}/_upgrade https://opensearch.org/docs/latest /// Comma-separated list of indexes; use the special string `_all` or Indices.All to perform the operation on all indexes. + /// /// Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi("indices.upgrade", "index")] + [Obsolete("Deprecated in version 1.0.0: ")] + [MapsApi("indices.upgrade", "index, body")] public Task UpgradeAsync( string index, + PostData body, UpgradeRequestParameters requestParameters = null, CancellationToken ctx = default ) @@ -2578,7 +2596,7 @@ public Task UpgradeAsync( POST, Url($"{index:index}/_upgrade"), ctx, - null, + body, RequestParams(requestParameters) );