From 81791d0a76ad60b997a42e782a25d39a7b5b2363 Mon Sep 17 00:00:00 2001 From: Sylvain Wallez Date: Tue, 28 Jun 2022 13:54:20 +0200 Subject: [PATCH] Misc java fixes 220617 (#1773) * Fix MultiTermsRequest - elastic/elasticsearch-java#160 * TypeFieldMappings is a multi-key dictionary - elastic/elasticsearch-java#166 * Fix TranslateSqlResponse - elastic/elasticsearch-java#167 * Token filter properties are generally optional - elastic/elasticsearch-java#199 * Fix typo in IndexSettings.mapping and allow extended settings - elastic/elasticsearch-java#295 * ShardRecovery.stop_time_in_millis is optional - elastic/elasticsearch-java#202 --- .gitignore | 1 + output/schema/schema.json | 582 +++++++++++------- output/typescript/types.ts | 90 +-- specification/_types/aggregations/bucket.ts | 26 +- .../_types/analysis/token_filters.ts | 50 +- specification/indices/_types/IndexSettings.ts | 8 +- .../indices/get_field_mapping/types.ts | 4 +- specification/indices/recovery/types.ts | 2 +- .../sql/translate/TranslateSqlResponse.ts | 13 +- 9 files changed, 455 insertions(+), 321 deletions(-) diff --git a/.gitignore b/.gitignore index 6014837563..126fc4a283 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ typescript-generator/lib report output/schema/import-* +output/schema/schema-no-generics.json .github/**/package-lock.json # Editor lockfiles diff --git a/output/schema/schema.json b/output/schema/schema.json index 30967f9570..281a5e3bec 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -39809,6 +39809,58 @@ ], "specLocation": "_types/aggregations/Aggregate.ts#L123-L125" }, + { + "kind": "type_alias", + "name": { + "name": "AggregateOrder", + "namespace": "_types.aggregations" + }, + "specLocation": "_types/aggregations/bucket.ts#L395-L397", + "type": { + "items": [ + { + "key": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + "kind": "dictionary_of", + "singleKey": true, + "value": { + "kind": "instance_of", + "type": { + "name": "SortOrder", + "namespace": "_types" + } + } + }, + { + "kind": "array_of", + "value": { + "key": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + "kind": "dictionary_of", + "singleKey": true, + "value": { + "kind": "instance_of", + "type": { + "name": "SortOrder", + "namespace": "_types" + } + } + } + } + ], + "kind": "union_of" + } + }, { "kind": "interface", "name": { @@ -40796,7 +40848,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L292-L296" + "specLocation": "_types/aggregations/bucket.ts#L294-L298" }, { "kind": "interface", @@ -42003,7 +42055,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L427-L491" + "specLocation": "_types/aggregations/bucket.ts#L429-L493" }, { "codegenNames": [ @@ -42015,7 +42067,7 @@ "name": "CategorizeTextAnalyzer", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L493-L496", + "specLocation": "_types/aggregations/bucket.ts#L495-L498", "type": { "items": [ { @@ -42066,7 +42118,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L316-L319" + "specLocation": "_types/aggregations/bucket.ts#L318-L321" }, { "attachedBehaviors": [ @@ -42459,7 +42511,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L498-L502" + "specLocation": "_types/aggregations/bucket.ts#L500-L504" }, { "inherits": { @@ -42637,7 +42689,7 @@ "type": { "kind": "instance_of", "type": { - "name": "HistogramOrder", + "name": "AggregateOrder", "namespace": "_types.aggregations" } } @@ -44441,7 +44493,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L321-L323" + "specLocation": "_types/aggregations/bucket.ts#L323-L325" }, { "kind": "interface", @@ -44635,7 +44687,7 @@ "type": { "kind": "instance_of", "type": { - "name": "HistogramOrder", + "name": "AggregateOrder", "namespace": "_types.aggregations" } } @@ -44717,38 +44769,6 @@ ], "specLocation": "_types/aggregations/Aggregate.ts#L330-L333" }, - { - "kind": "interface", - "name": { - "name": "HistogramOrder", - "namespace": "_types.aggregations" - }, - "properties": [ - { - "name": "_count", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortOrder", - "namespace": "_types" - } - } - }, - { - "name": "_key", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortOrder", - "namespace": "_types" - } - } - } - ], - "specLocation": "_types/aggregations/bucket.ts#L246-L249" - }, { "kind": "interface", "name": { @@ -45295,7 +45315,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L251-L254" + "specLocation": "_types/aggregations/bucket.ts#L246-L249" }, { "kind": "interface", @@ -45362,7 +45382,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L256-L260" + "specLocation": "_types/aggregations/bucket.ts#L251-L255" }, { "attachedBehaviors": [ @@ -46159,7 +46179,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L262-L265" + "specLocation": "_types/aggregations/bucket.ts#L257-L260" }, { "kind": "enum", @@ -46489,7 +46509,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L271-L273" + "specLocation": "_types/aggregations/bucket.ts#L273-L275" }, { "inherits": { @@ -46529,6 +46549,83 @@ "namespace": "_types.aggregations" }, "properties": [ + { + "name": "collect_mode", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "TermsAggregationCollectMode", + "namespace": "_types.aggregations" + } + } + }, + { + "name": "order", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "AggregateOrder", + "namespace": "_types.aggregations" + } + } + }, + { + "name": "min_doc_count", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "shard_min_doc_count", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "shard_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "show_term_doc_count_error", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, { "name": "terms", "required": true, @@ -46544,7 +46641,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L267-L269" + "specLocation": "_types/aggregations/bucket.ts#L262-L271" }, { "attachedBehaviors": [ @@ -46650,7 +46747,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L325-L328" + "specLocation": "_types/aggregations/bucket.ts#L327-L330" }, { "attachedBehaviors": [ @@ -46696,7 +46793,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L275-L277" + "specLocation": "_types/aggregations/bucket.ts#L277-L279" }, { "inherits": { @@ -46798,7 +46895,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L279-L281" + "specLocation": "_types/aggregations/bucket.ts#L281-L283" }, { "kind": "interface", @@ -46807,7 +46904,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/bucket.ts#L330-L330" + "specLocation": "_types/aggregations/bucket.ts#L332-L332" }, { "inherits": { @@ -47200,7 +47297,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L283-L290" + "specLocation": "_types/aggregations/bucket.ts#L285-L292" }, { "attachedBehaviors": [ @@ -47368,7 +47465,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L298-L306" + "specLocation": "_types/aggregations/bucket.ts#L300-L308" }, { "inherits": { @@ -47507,7 +47604,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L308-L310" + "specLocation": "_types/aggregations/bucket.ts#L310-L312" }, { "attachedBehaviors": [ @@ -47553,7 +47650,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L312-L314" + "specLocation": "_types/aggregations/bucket.ts#L314-L316" }, { "kind": "enum", @@ -47593,7 +47690,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L332-L334" + "specLocation": "_types/aggregations/bucket.ts#L334-L336" }, { "inherits": { @@ -48024,7 +48121,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L336-L352" + "specLocation": "_types/aggregations/bucket.ts#L338-L354" }, { "attachedBehaviors": [ @@ -48283,7 +48380,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L354-L372" + "specLocation": "_types/aggregations/bucket.ts#L356-L374" }, { "inherits": { @@ -49592,7 +49689,7 @@ "type": { "kind": "instance_of", "type": { - "name": "TermsAggregationOrder", + "name": "AggregateOrder", "namespace": "_types.aggregations" } } @@ -49653,7 +49750,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L374-L391" + "specLocation": "_types/aggregations/bucket.ts#L376-L393" }, { "kind": "enum", @@ -49669,7 +49766,7 @@ "name": "TermsAggregationCollectMode", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L397-L400" + "specLocation": "_types/aggregations/bucket.ts#L399-L402" }, { "kind": "enum", @@ -49691,59 +49788,7 @@ "name": "TermsAggregationExecutionHint", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L402-L407" - }, - { - "kind": "type_alias", - "name": { - "name": "TermsAggregationOrder", - "namespace": "_types.aggregations" - }, - "specLocation": "_types/aggregations/bucket.ts#L393-L395", - "type": { - "items": [ - { - "key": { - "kind": "instance_of", - "type": { - "name": "Field", - "namespace": "_types" - } - }, - "kind": "dictionary_of", - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "SortOrder", - "namespace": "_types" - } - } - }, - { - "kind": "array_of", - "value": { - "key": { - "kind": "instance_of", - "type": { - "name": "Field", - "namespace": "_types" - } - }, - "kind": "dictionary_of", - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "SortOrder", - "namespace": "_types" - } - } - } - } - ], - "kind": "union_of" - } + "specLocation": "_types/aggregations/bucket.ts#L404-L409" }, { "attachedBehaviors": [ @@ -49785,7 +49830,7 @@ "name": "TermsExclude", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L412-L413", + "specLocation": "_types/aggregations/bucket.ts#L414-L415", "type": { "items": [ { @@ -49820,7 +49865,7 @@ "name": "TermsInclude", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L409-L410", + "specLocation": "_types/aggregations/bucket.ts#L411-L412", "type": { "items": [ { @@ -49881,7 +49926,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L415-L418" + "specLocation": "_types/aggregations/bucket.ts#L417-L420" }, { "kind": "interface", @@ -50550,7 +50595,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L420-L425" + "specLocation": "_types/aggregations/bucket.ts#L422-L427" }, { "attachedBehaviors": [ @@ -50897,7 +50942,7 @@ }, { "name": "preserve_original", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51446,7 +51491,7 @@ }, { "name": "delimiter", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51457,7 +51502,7 @@ }, { "name": "encoding", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51561,7 +51606,7 @@ }, { "name": "max_gram", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51572,7 +51617,7 @@ }, { "name": "min_gram", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51700,7 +51745,7 @@ }, { "name": "articles", - "required": true, + "required": false, "type": { "kind": "array_of", "value": { @@ -51712,9 +51757,20 @@ } } }, + { + "name": "articles_path", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "name": "articles_case", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51724,7 +51780,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L186-L190" + "specLocation": "_types/analysis/token_filters.ts#L186-L191" }, { "kind": "interface", @@ -51833,7 +51889,7 @@ }, { "name": "max_output_size", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51844,7 +51900,7 @@ }, { "name": "separator", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51854,7 +51910,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L192-L196" + "specLocation": "_types/analysis/token_filters.ts#L193-L197" }, { "inherits": { @@ -51903,7 +51959,7 @@ }, { "name": "dedup", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51914,7 +51970,7 @@ }, { "name": "dictionary", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51936,7 +51992,7 @@ }, { "name": "longest_only", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -51946,7 +52002,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L198-L204" + "specLocation": "_types/analysis/token_filters.ts#L199-L205" }, { "inherits": { @@ -52500,7 +52556,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L237-L239" + "specLocation": "_types/analysis/token_filters.ts#L238-L240" }, { "kind": "enum", @@ -52516,7 +52572,7 @@ "name": "KeepTypesMode", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/token_filters.ts#L211-L214" + "specLocation": "_types/analysis/token_filters.ts#L212-L215" }, { "inherits": { @@ -52565,7 +52621,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L216-L220" + "specLocation": "_types/analysis/token_filters.ts#L217-L221" }, { "inherits": { @@ -52625,7 +52681,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L222-L227" + "specLocation": "_types/analysis/token_filters.ts#L223-L228" }, { "kind": "interface", @@ -52725,7 +52781,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L229-L235" + "specLocation": "_types/analysis/token_filters.ts#L230-L236" }, { "inherits": { @@ -53290,7 +53346,7 @@ }, { "name": "max", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -53301,7 +53357,7 @@ }, { "name": "min", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -53311,7 +53367,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L241-L245" + "specLocation": "_types/analysis/token_filters.ts#L242-L246" }, { "inherits": { @@ -53360,7 +53416,7 @@ }, { "name": "consume_all_tokens", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -53371,7 +53427,7 @@ }, { "name": "max_token_count", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -53381,7 +53437,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L247-L251" + "specLocation": "_types/analysis/token_filters.ts#L248-L252" }, { "kind": "interface", @@ -53434,7 +53490,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L253-L256" + "specLocation": "_types/analysis/token_filters.ts#L254-L257" }, { "inherits": { @@ -53546,7 +53602,7 @@ }, { "name": "preserve_original", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -53556,7 +53612,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L258-L262" + "specLocation": "_types/analysis/token_filters.ts#L259-L263" }, { "inherits": { @@ -53613,7 +53669,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L264-L269" + "specLocation": "_types/analysis/token_filters.ts#L265-L270" }, { "inherits": { @@ -53793,7 +53849,7 @@ }, { "name": "stoptags", - "required": true, + "required": false, "type": { "kind": "array_of", "value": { @@ -53806,7 +53862,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L271-L274" + "specLocation": "_types/analysis/token_filters.ts#L272-L275" }, { "inherits": { @@ -54101,7 +54157,7 @@ }, { "name": "preserve_original", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -54111,7 +54167,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L276-L280" + "specLocation": "_types/analysis/token_filters.ts#L277-L281" }, { "inherits": { @@ -54191,9 +54247,20 @@ "value": "pattern_replace" } }, + { + "name": "all", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "name": "flags", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -54215,7 +54282,7 @@ }, { "name": "replacement", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -54225,7 +54292,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L282-L287" + "specLocation": "_types/analysis/token_filters.ts#L283-L289" }, { "inherits": { @@ -54526,7 +54593,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L289-L291" + "specLocation": "_types/analysis/token_filters.ts#L291-L293" }, { "inherits": { @@ -54561,7 +54628,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L293-L296" + "specLocation": "_types/analysis/token_filters.ts#L295-L298" }, { "inherits": { @@ -54585,7 +54652,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L298-L300" + "specLocation": "_types/analysis/token_filters.ts#L300-L302" }, { "inherits": { @@ -54609,7 +54676,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L302-L304" + "specLocation": "_types/analysis/token_filters.ts#L304-L306" }, { "inherits": { @@ -54914,7 +54981,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L306-L309" + "specLocation": "_types/analysis/token_filters.ts#L308-L311" }, { "kind": "interface", @@ -55038,7 +55105,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L311-L315" + "specLocation": "_types/analysis/token_filters.ts#L313-L317" }, { "inherits": { @@ -55073,7 +55140,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L317-L320" + "specLocation": "_types/analysis/token_filters.ts#L319-L322" }, { "kind": "interface", @@ -55171,7 +55238,7 @@ }, { "name": "stopwords", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -55487,7 +55554,7 @@ "name": "TokenFilter", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/token_filters.ts#L340-L342", + "specLocation": "_types/analysis/token_filters.ts#L342-L344", "type": { "items": [ { @@ -55535,7 +55602,7 @@ "name": "TokenFilterDefinition", "namespace": "_types.analysis" }, - "specLocation": "_types/analysis/token_filters.ts#L344-L397", + "specLocation": "_types/analysis/token_filters.ts#L346-L399", "type": { "items": [ { @@ -56073,7 +56140,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L322-L324" + "specLocation": "_types/analysis/token_filters.ts#L324-L326" }, { "inherits": { @@ -56098,7 +56165,7 @@ }, { "name": "length", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -56108,7 +56175,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L326-L329" + "specLocation": "_types/analysis/token_filters.ts#L328-L331" }, { "inherits": { @@ -56178,7 +56245,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L331-L334" + "specLocation": "_types/analysis/token_filters.ts#L333-L336" }, { "inherits": { @@ -56202,7 +56269,7 @@ } } ], - "specLocation": "_types/analysis/token_filters.ts#L336-L338" + "specLocation": "_types/analysis/token_filters.ts#L338-L340" }, { "kind": "interface", @@ -98528,7 +98595,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L394-L396" + "specLocation": "indices/_types/IndexSettings.ts#L398-L400" }, { "kind": "interface", @@ -98813,7 +98880,7 @@ "name": "IndexCheckOnStartup", "namespace": "indices._types" }, - "specLocation": "indices/_types/IndexSettings.ts#L249-L256" + "specLocation": "indices/_types/IndexSettings.ts#L253-L260" }, { "kind": "interface", @@ -99226,9 +99293,32 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L241-L247" + "specLocation": "indices/_types/IndexSettings.ts#L245-L251" }, { + "attachedBehaviors": [ + "AdditionalProperties" + ], + "behaviors": [ + { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "user_defined_value" + } + ], + "type": { + "name": "AdditionalProperties", + "namespace": "_spec_utils" + } + } + ], "docId": "index-modules-settings", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/index-modules.html#index-modules-settings", "kind": "interface", @@ -99950,7 +100040,7 @@ }, { "description": "Enable or disable dynamic mapping for an index.", - "name": "mappings", + "name": "mapping", "required": false, "type": { "kind": "instance_of", @@ -99996,7 +100086,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L67-L164" + "specLocation": "indices/_types/IndexSettings.ts#L69-L168" }, { "kind": "interface", @@ -100116,7 +100206,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L306-L312" + "specLocation": "indices/_types/IndexSettings.ts#L310-L316" }, { "kind": "interface", @@ -100200,7 +100290,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L263-L296" + "specLocation": "indices/_types/IndexSettings.ts#L267-L300" }, { "kind": "interface", @@ -100222,7 +100312,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L298-L304" + "specLocation": "indices/_types/IndexSettings.ts#L302-L308" }, { "kind": "interface", @@ -100254,7 +100344,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L314-L317" + "specLocation": "indices/_types/IndexSettings.ts#L318-L321" }, { "kind": "interface", @@ -100556,7 +100646,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L258-L261" + "specLocation": "indices/_types/IndexSettings.ts#L262-L265" }, { "kind": "interface", @@ -100577,7 +100667,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L532-L534" + "specLocation": "indices/_types/IndexSettings.ts#L536-L538" }, { "kind": "interface", @@ -100599,7 +100689,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L536-L543" + "specLocation": "indices/_types/IndexSettings.ts#L540-L547" }, { "description": "Mapping Limit Settings", @@ -100689,7 +100779,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L398-L410" + "specLocation": "indices/_types/IndexSettings.ts#L402-L414" }, { "kind": "interface", @@ -100712,7 +100802,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L422-L429" + "specLocation": "indices/_types/IndexSettings.ts#L426-L433" }, { "kind": "interface", @@ -100734,7 +100824,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L459-L465" + "specLocation": "indices/_types/IndexSettings.ts#L463-L469" }, { "kind": "interface", @@ -100756,7 +100846,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L450-L457" + "specLocation": "indices/_types/IndexSettings.ts#L454-L461" }, { "kind": "interface", @@ -100779,7 +100869,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L431-L439" + "specLocation": "indices/_types/IndexSettings.ts#L435-L443" }, { "kind": "interface", @@ -100802,7 +100892,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L441-L448" + "specLocation": "indices/_types/IndexSettings.ts#L445-L452" }, { "kind": "interface", @@ -100825,7 +100915,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L412-L420" + "specLocation": "indices/_types/IndexSettings.ts#L416-L424" }, { "kind": "interface", @@ -100846,7 +100936,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L319-L321" + "specLocation": "indices/_types/IndexSettings.ts#L323-L325" }, { "kind": "interface", @@ -100878,7 +100968,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L323-L326" + "specLocation": "indices/_types/IndexSettings.ts#L327-L330" }, { "kind": "interface", @@ -100936,7 +101026,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L390-L392" + "specLocation": "indices/_types/IndexSettings.ts#L394-L396" }, { "kind": "interface", @@ -100957,7 +101047,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L63-L65" + "specLocation": "indices/_types/IndexSettings.ts#L65-L67" }, { "kind": "interface", @@ -100979,7 +101069,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L232-L235" + "specLocation": "indices/_types/IndexSettings.ts#L236-L239" }, { "kind": "enum", @@ -101063,7 +101153,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L222-L225" + "specLocation": "indices/_types/IndexSettings.ts#L226-L229" }, { "kind": "interface", @@ -101085,7 +101175,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L217-L220" + "specLocation": "indices/_types/IndexSettings.ts#L221-L224" }, { "kind": "interface", @@ -101106,7 +101196,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L237-L239" + "specLocation": "indices/_types/IndexSettings.ts#L241-L243" }, { "kind": "interface", @@ -101138,7 +101228,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L227-L230" + "specLocation": "indices/_types/IndexSettings.ts#L231-L234" }, { "kind": "interface", @@ -101225,7 +101315,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L166-L174" + "specLocation": "indices/_types/IndexSettings.ts#L170-L178" }, { "kind": "interface", @@ -101276,7 +101366,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L176-L181" + "specLocation": "indices/_types/IndexSettings.ts#L180-L185" }, { "kind": "interface", @@ -101305,7 +101395,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L183-L186" + "specLocation": "indices/_types/IndexSettings.ts#L187-L190" }, { "kind": "interface", @@ -101356,7 +101446,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L188-L193" + "specLocation": "indices/_types/IndexSettings.ts#L192-L197" }, { "kind": "interface", @@ -101407,7 +101497,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L195-L200" + "specLocation": "indices/_types/IndexSettings.ts#L199-L204" }, { "kind": "interface", @@ -101436,7 +101526,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L202-L205" + "specLocation": "indices/_types/IndexSettings.ts#L206-L209" }, { "kind": "interface", @@ -101465,7 +101555,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L207-L210" + "specLocation": "indices/_types/IndexSettings.ts#L211-L214" }, { "kind": "interface", @@ -101494,7 +101584,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L212-L215" + "specLocation": "indices/_types/IndexSettings.ts#L216-L219" }, { "kind": "interface", @@ -101548,7 +101638,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L467-L472" + "specLocation": "indices/_types/IndexSettings.ts#L471-L476" }, { "kind": "interface", @@ -101602,7 +101692,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L485-L490" + "specLocation": "indices/_types/IndexSettings.ts#L489-L494" }, { "kind": "interface", @@ -101648,7 +101738,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L474-L483" + "specLocation": "indices/_types/IndexSettings.ts#L478-L487" }, { "kind": "interface", @@ -101683,7 +101773,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L48-L61" + "specLocation": "indices/_types/IndexSettings.ts#L50-L63" }, { "kind": "interface", @@ -101716,7 +101806,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L492-L501" + "specLocation": "indices/_types/IndexSettings.ts#L496-L505" }, { "kind": "enum", @@ -101745,7 +101835,7 @@ "name": "StorageType", "namespace": "indices._types" }, - "specLocation": "indices/_types/IndexSettings.ts#L503-L530" + "specLocation": "indices/_types/IndexSettings.ts#L507-L534" }, { "kind": "interface", @@ -101902,7 +101992,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L328-L350" + "specLocation": "indices/_types/IndexSettings.ts#L332-L354" }, { "kind": "enum", @@ -101926,7 +102016,7 @@ "name": "TranslogDurability", "namespace": "indices._types" }, - "specLocation": "indices/_types/IndexSettings.ts#L352-L367" + "specLocation": "indices/_types/IndexSettings.ts#L356-L371" }, { "kind": "interface", @@ -101962,7 +102052,7 @@ } } ], - "specLocation": "indices/_types/IndexSettings.ts#L369-L388" + "specLocation": "indices/_types/IndexSettings.ts#L373-L392" }, { "kind": "enum", @@ -106065,7 +106155,7 @@ } }, "kind": "dictionary_of", - "singleKey": true, + "singleKey": false, "value": { "kind": "instance_of", "type": { @@ -108844,7 +108934,7 @@ }, { "name": "stop_time_in_millis", - "required": true, + "required": false, "type": { "generics": [ { @@ -166199,9 +166289,31 @@ "body": { "kind": "properties", "properties": [ + { + "name": "aggregations", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "AggregationContainer", + "namespace": "_types.aggregations" + } + } + } + }, { "name": "size", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -166212,7 +166324,7 @@ }, { "name": "_source", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -166223,32 +166335,32 @@ }, { "name": "fields", - "required": true, + "required": false, "type": { "kind": "array_of", "value": { - "key": { - "kind": "instance_of", - "type": { - "name": "Field", - "namespace": "_types" - } - }, - "kind": "dictionary_of", - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "kind": "instance_of", + "type": { + "name": "FieldAndFormat", + "namespace": "_types.query_dsl" } } } }, + { + "name": "query", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "QueryContainer", + "namespace": "_types.query_dsl" + } + } + }, { "name": "sort", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -166264,7 +166376,7 @@ "name": "Response", "namespace": "sql.translate" }, - "specLocation": "sql/translate/TranslateSqlResponse.ts#L26-L33" + "specLocation": "sql/translate/TranslateSqlResponse.ts#L28-L38" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 9329bbbeb9..ef3a8329ed 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2581,6 +2581,8 @@ export interface AggregationsAggregateBase { meta?: Metadata } +export type AggregationsAggregateOrder = Partial> | Partial>[] + export interface AggregationsAggregation { meta?: Metadata name?: string @@ -2872,7 +2874,7 @@ export interface AggregationsDateHistogramAggregation extends AggregationsBucket min_doc_count?: integer missing?: DateTime offset?: Duration - order?: AggregationsHistogramOrder + order?: AggregationsAggregateOrder params?: Record script?: Script time_zone?: TimeZone @@ -3127,7 +3129,7 @@ export interface AggregationsHistogramAggregation extends AggregationsBucketAggr min_doc_count?: integer missing?: double offset?: double - order?: AggregationsHistogramOrder + order?: AggregationsAggregateOrder script?: Script format?: string keyed?: boolean @@ -3140,11 +3142,6 @@ export interface AggregationsHistogramBucketKeys extends AggregationsMultiBucket export type AggregationsHistogramBucket = AggregationsHistogramBucketKeys & { [property: string]: AggregationsAggregate | string | double | long } -export interface AggregationsHistogramOrder { - _count?: SortOrder - _key?: SortOrder -} - export interface AggregationsHoltLinearModelSettings { alpha?: float beta?: float @@ -3363,6 +3360,13 @@ export interface AggregationsMultiTermsAggregate extends AggregationsTermsAggreg } export interface AggregationsMultiTermsAggregation extends AggregationsBucketAggregationBase { + collect_mode?: AggregationsTermsAggregationCollectMode + order?: AggregationsAggregateOrder + min_doc_count?: long + shard_min_doc_count?: long + shard_size?: integer + show_term_doc_count_error?: boolean + size?: integer terms: AggregationsMultiTermLookup[] } @@ -3723,7 +3727,7 @@ export interface AggregationsTermsAggregation extends AggregationsBucketAggregat missing_order?: AggregationsMissingOrder missing_bucket?: boolean value_type?: string - order?: AggregationsTermsAggregationOrder + order?: AggregationsAggregateOrder script?: Script shard_size?: integer show_term_doc_count_error?: boolean @@ -3735,8 +3739,6 @@ export type AggregationsTermsAggregationCollectMode = 'depth_first' | 'breadth_f export type AggregationsTermsAggregationExecutionHint = 'map' | 'global_ordinals' | 'global_ordinals_hash' | 'global_ordinals_low_cardinality' -export type AggregationsTermsAggregationOrder = Record | Record[] - export interface AggregationsTermsBucketBase extends AggregationsMultiBucketBase { doc_count_error?: long } @@ -3857,7 +3859,7 @@ export type AnalysisAnalyzer = AnalysisCustomAnalyzer | AnalysisFingerprintAnaly export interface AnalysisAsciiFoldingTokenFilter extends AnalysisTokenFilterBase { type: 'asciifolding' - preserve_original: boolean + preserve_original?: boolean } export type AnalysisCharFilter = string | AnalysisCharFilterDefinition @@ -3917,8 +3919,8 @@ export type AnalysisDelimitedPayloadEncoding = 'int' | 'float' | 'identity' export interface AnalysisDelimitedPayloadTokenFilter extends AnalysisTokenFilterBase { type: 'delimited_payload' - delimiter: string - encoding: AnalysisDelimitedPayloadEncoding + delimiter?: string + encoding?: AnalysisDelimitedPayloadEncoding } export interface AnalysisDictionaryDecompounderTokenFilter extends AnalysisCompoundWordTokenFilterBase { @@ -3934,8 +3936,8 @@ export type AnalysisEdgeNGramSide = 'front' | 'back' export interface AnalysisEdgeNGramTokenFilter extends AnalysisTokenFilterBase { type: 'edge_ngram' - max_gram: integer - min_gram: integer + max_gram?: integer + min_gram?: integer side?: AnalysisEdgeNGramSide preserve_original?: boolean } @@ -3950,8 +3952,9 @@ export interface AnalysisEdgeNGramTokenizer extends AnalysisTokenizerBase { export interface AnalysisElisionTokenFilter extends AnalysisTokenFilterBase { type: 'elision' - articles: string[] - articles_case: boolean + articles?: string[] + articles_path?: string + articles_case?: boolean } export interface AnalysisFingerprintAnalyzer { @@ -3966,8 +3969,8 @@ export interface AnalysisFingerprintAnalyzer { export interface AnalysisFingerprintTokenFilter extends AnalysisTokenFilterBase { type: 'fingerprint' - max_output_size: integer - separator: string + max_output_size?: integer + separator?: string } export interface AnalysisHtmlStripCharFilter extends AnalysisCharFilterBase { @@ -3976,10 +3979,10 @@ export interface AnalysisHtmlStripCharFilter extends AnalysisCharFilterBase { export interface AnalysisHunspellTokenFilter extends AnalysisTokenFilterBase { type: 'hunspell' - dedup: boolean - dictionary: string + dedup?: boolean + dictionary?: string locale: string - longest_only: boolean + longest_only?: boolean } export interface AnalysisHyphenationDecompounderTokenFilter extends AnalysisCompoundWordTokenFilterBase { @@ -4138,8 +4141,8 @@ export interface AnalysisLanguageAnalyzer { export interface AnalysisLengthTokenFilter extends AnalysisTokenFilterBase { type: 'length' - max: integer - min: integer + max?: integer + min?: integer } export interface AnalysisLetterTokenizer extends AnalysisTokenizerBase { @@ -4148,8 +4151,8 @@ export interface AnalysisLetterTokenizer extends AnalysisTokenizerBase { export interface AnalysisLimitTokenCountTokenFilter extends AnalysisTokenFilterBase { type: 'limit' - consume_all_tokens: boolean - max_token_count: integer + consume_all_tokens?: boolean + max_token_count?: integer } export interface AnalysisLowercaseNormalizer { @@ -4174,7 +4177,7 @@ export interface AnalysisMappingCharFilter extends AnalysisCharFilterBase { export interface AnalysisMultiplexerTokenFilter extends AnalysisTokenFilterBase { type: 'multiplexer' filters: string[] - preserve_original: boolean + preserve_original?: boolean } export interface AnalysisNGramTokenFilter extends AnalysisTokenFilterBase { @@ -4204,7 +4207,7 @@ export type AnalysisNoriDecompoundMode = 'discard' | 'none' | 'mixed' export interface AnalysisNoriPartOfSpeechTokenFilter extends AnalysisTokenFilterBase { type: 'nori_part_of_speech' - stoptags: string[] + stoptags?: string[] } export interface AnalysisNoriTokenizer extends AnalysisTokenizerBase { @@ -4238,7 +4241,7 @@ export interface AnalysisPatternAnalyzer { export interface AnalysisPatternCaptureTokenFilter extends AnalysisTokenFilterBase { type: 'pattern_capture' patterns: string[] - preserve_original: boolean + preserve_original?: boolean } export interface AnalysisPatternReplaceCharFilter extends AnalysisCharFilterBase { @@ -4250,9 +4253,10 @@ export interface AnalysisPatternReplaceCharFilter extends AnalysisCharFilterBase export interface AnalysisPatternReplaceTokenFilter extends AnalysisTokenFilterBase { type: 'pattern_replace' - flags: string + all?: boolean + flags?: string pattern: string - replacement: string + replacement?: string } export interface AnalysisPatternTokenizer extends AnalysisTokenizerBase { @@ -4359,7 +4363,7 @@ export interface AnalysisStopTokenFilter extends AnalysisTokenFilterBase { type: 'stop' ignore_case?: boolean remove_trailing?: boolean - stopwords: AnalysisStopWords + stopwords?: AnalysisStopWords stopwords_path?: string } @@ -4413,7 +4417,7 @@ export interface AnalysisTrimTokenFilter extends AnalysisTokenFilterBase { export interface AnalysisTruncateTokenFilter extends AnalysisTokenFilterBase { type: 'truncate' - length: integer + length?: integer } export interface AnalysisUaxEmailUrlTokenizer extends AnalysisTokenizerBase { @@ -9329,7 +9333,7 @@ export interface IndicesIndexSettingBlocks { metadata?: boolean } -export interface IndicesIndexSettings { +export interface IndicesIndexSettingsKeys { index?: IndicesIndexSettings mode?: string routing_path?: string | string[] @@ -9383,11 +9387,13 @@ export interface IndicesIndexSettings { shards?: integer queries?: IndicesQueries similarity?: IndicesSettingsSimilarity - mappings?: IndicesMappingLimitSettings + mapping?: IndicesMappingLimitSettings 'indexing.slowlog'?: IndicesSlowlogSettings indexing_pressure?: IndicesIndexingPressure store?: IndicesStorage } +export type IndicesIndexSettings = IndicesIndexSettingsKeys + & { [property: string]: any } export interface IndicesIndexSettingsAnalysis { analyzer?: Record @@ -10069,7 +10075,7 @@ export interface IndicesGetFieldMappingRequest extends RequestBase { export type IndicesGetFieldMappingResponse = Record export interface IndicesGetFieldMappingTypeFieldMappings { - mappings: Partial> + mappings: Record } export interface IndicesGetIndexTemplateIndexTemplateItem { @@ -10350,7 +10356,7 @@ export interface IndicesRecoveryShardRecovery { start_time?: DateTime start_time_in_millis: EpochTime stop_time?: DateTime - stop_time_in_millis: EpochTime + stop_time_in_millis?: EpochTime target: IndicesRecoveryRecoveryOrigin total_time?: Duration total_time_in_millis: DurationValue @@ -16557,10 +16563,12 @@ export interface SqlTranslateRequest extends RequestBase { } export interface SqlTranslateResponse { - size: long - _source: SearchSourceConfig - fields: Record[] - sort: Sort + aggregations?: Record + size?: long + _source?: SearchSourceConfig + fields?: (QueryDslFieldAndFormat | Field)[] + query?: QueryDslQueryContainer + sort?: Sort } export interface SslCertificatesCertificateInformation { diff --git a/specification/_types/aggregations/bucket.ts b/specification/_types/aggregations/bucket.ts index 55de3b7cb7..b408ecc09d 100644 --- a/specification/_types/aggregations/bucket.ts +++ b/specification/_types/aggregations/bucket.ts @@ -18,7 +18,7 @@ */ import { SortOrder } from '@_types/sort' -import { Dictionary } from '@spec_utils/Dictionary' +import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { EmptyObject } from '@_types/common' import { Field, RelationName, Fields } from '@_types/common' @@ -99,7 +99,7 @@ export class DateHistogramAggregation extends BucketAggregationBase { min_doc_count?: integer missing?: DateTime offset?: Duration - order?: HistogramOrder + order?: AggregateOrder params?: Dictionary script?: Script time_zone?: TimeZone @@ -237,17 +237,12 @@ export class HistogramAggregation extends BucketAggregationBase { min_doc_count?: integer missing?: double offset?: double - order?: HistogramOrder + order?: AggregateOrder script?: Script format?: string keyed?: boolean } -export class HistogramOrder { - _count?: SortOrder - _key?: SortOrder -} - export class IpRangeAggregation extends BucketAggregationBase { field?: Field ranges?: IpRangeAggregationRange[] @@ -265,6 +260,13 @@ export class MissingAggregation extends BucketAggregationBase { } export class MultiTermsAggregation extends BucketAggregationBase { + collect_mode?: TermsAggregationCollectMode + order?: AggregateOrder + min_doc_count?: long + shard_min_doc_count?: long + shard_size?: integer + show_term_doc_count_error?: boolean + size?: integer terms: MultiTermLookup[] } @@ -382,7 +384,7 @@ export class TermsAggregation extends BucketAggregationBase { missing_order?: MissingOrder missing_bucket?: boolean value_type?: string - order?: TermsAggregationOrder + order?: AggregateOrder script?: Script shard_size?: integer show_term_doc_count_error?: boolean @@ -390,9 +392,9 @@ export class TermsAggregation extends BucketAggregationBase { format?: string } -export type TermsAggregationOrder = - | Dictionary - | Dictionary[] +export type AggregateOrder = + | SingleKeyDictionary + | SingleKeyDictionary[] export enum TermsAggregationCollectMode { depth_first = 0, diff --git a/specification/_types/analysis/token_filters.ts b/specification/_types/analysis/token_filters.ts index b03c357aba..d7d621e17b 100644 --- a/specification/_types/analysis/token_filters.ts +++ b/specification/_types/analysis/token_filters.ts @@ -66,8 +66,8 @@ export enum DelimitedPayloadEncoding { export class DelimitedPayloadTokenFilter extends TokenFilterBase { type: 'delimited_payload' - delimiter: string - encoding: DelimitedPayloadEncoding + delimiter?: string + encoding?: DelimitedPayloadEncoding } export enum EdgeNGramSide { @@ -77,8 +77,8 @@ export enum EdgeNGramSide { export class EdgeNGramTokenFilter extends TokenFilterBase { type: 'edge_ngram' - max_gram: integer - min_gram: integer + max_gram?: integer + min_gram?: integer side?: EdgeNGramSide preserve_original?: boolean } @@ -97,7 +97,7 @@ export class StopTokenFilter extends TokenFilterBase { type: 'stop' ignore_case?: boolean remove_trailing?: boolean - stopwords: StopWords + stopwords?: StopWords stopwords_path?: string } @@ -166,7 +166,7 @@ export class WordDelimiterGraphTokenFilter extends TokenFilterBase { export class AsciiFoldingTokenFilter extends TokenFilterBase { type: 'asciifolding' - preserve_original: boolean + preserve_original?: boolean } export class CommonGramsTokenFilter extends TokenFilterBase { @@ -185,27 +185,28 @@ export class ConditionTokenFilter extends TokenFilterBase { export class ElisionTokenFilter extends TokenFilterBase { type: 'elision' - articles: string[] - articles_case: boolean + articles?: string[] + articles_path?: string + articles_case?: boolean } export class FingerprintTokenFilter extends TokenFilterBase { type: 'fingerprint' - max_output_size: integer - separator: string + max_output_size?: integer + separator?: string } export class HunspellTokenFilter extends TokenFilterBase { type: 'hunspell' - dedup: boolean - dictionary: string + dedup?: boolean + dictionary?: string locale: string - longest_only: boolean + longest_only?: boolean } export class JaStopTokenFilter extends TokenFilterBase { type: 'ja_stop' - stopwords: StopWords + stopwords?: StopWords } export enum KeepTypesMode { @@ -240,14 +241,14 @@ export class KStemTokenFilter extends TokenFilterBase { export class LengthTokenFilter extends TokenFilterBase { type: 'length' - max: integer - min: integer + max?: integer + min?: integer } export class LimitTokenCountTokenFilter extends TokenFilterBase { type: 'limit' - consume_all_tokens: boolean - max_token_count: integer + consume_all_tokens?: boolean + max_token_count?: integer } export class LowercaseTokenFilter extends TokenFilterBase { @@ -258,7 +259,7 @@ export class LowercaseTokenFilter extends TokenFilterBase { export class MultiplexerTokenFilter extends TokenFilterBase { type: 'multiplexer' filters: string[] - preserve_original: boolean + preserve_original?: boolean } export class NGramTokenFilter extends TokenFilterBase { @@ -270,20 +271,21 @@ export class NGramTokenFilter extends TokenFilterBase { export class NoriPartOfSpeechTokenFilter extends TokenFilterBase { type: 'nori_part_of_speech' - stoptags: string[] + stoptags?: string[] } export class PatternCaptureTokenFilter extends TokenFilterBase { type: 'pattern_capture' patterns: string[] - preserve_original: boolean + preserve_original?: boolean } export class PatternReplaceTokenFilter extends TokenFilterBase { type: 'pattern_replace' - flags: string + all?: boolean + flags?: string pattern: string - replacement: string + replacement?: string } export class PorterStemTokenFilter extends TokenFilterBase { @@ -325,7 +327,7 @@ export class TrimTokenFilter extends TokenFilterBase { export class TruncateTokenFilter extends TokenFilterBase { type: 'truncate' - length: integer + length?: integer } export class UniqueTokenFilter extends TokenFilterBase { diff --git a/specification/indices/_types/IndexSettings.ts b/specification/indices/_types/IndexSettings.ts index 4ca9a7cb10..613765bcf6 100644 --- a/specification/indices/_types/IndexSettings.ts +++ b/specification/indices/_types/IndexSettings.ts @@ -44,6 +44,8 @@ import { } from '@_types/Similarity' import { Script } from '@_types/Scripting' import { Stringified } from '@spec_utils/Stringified' +import { AdditionalProperties } from '@spec_utils/behaviors' +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' export class SoftDeletes { /** @@ -67,7 +69,9 @@ export class RetentionLease { /** * @doc_id index-modules-settings */ -export class IndexSettings { +export class IndexSettings + implements AdditionalProperties +{ index?: IndexSettings mode?: string routing_path?: string | string[] @@ -151,7 +155,7 @@ export class IndexSettings { /** * Enable or disable dynamic mapping for an index. */ - mappings?: MappingLimitSettings + mapping?: MappingLimitSettings 'indexing.slowlog'?: SlowlogSettings /** * Configure indexing back pressure limits. diff --git a/specification/indices/get_field_mapping/types.ts b/specification/indices/get_field_mapping/types.ts index 26b1f4206e..04b5916c8a 100644 --- a/specification/indices/get_field_mapping/types.ts +++ b/specification/indices/get_field_mapping/types.ts @@ -17,10 +17,10 @@ * under the License. */ -import { SingleKeyDictionary } from '@spec_utils/Dictionary' +import { Dictionary } from '@spec_utils/Dictionary' import { Field } from '@_types/common' import { FieldMapping } from '@_types/mapping/meta-fields' export class TypeFieldMappings { - mappings: SingleKeyDictionary + mappings: Dictionary } diff --git a/specification/indices/recovery/types.ts b/specification/indices/recovery/types.ts index bd7fa1baf1..5d74fce262 100644 --- a/specification/indices/recovery/types.ts +++ b/specification/indices/recovery/types.ts @@ -125,7 +125,7 @@ export class ShardRecovery { start_time?: DateTime start_time_in_millis: EpochTime stop_time?: DateTime - stop_time_in_millis: EpochTime + stop_time_in_millis?: EpochTime target: RecoveryOrigin total_time?: Duration total_time_in_millis: DurationValue diff --git a/specification/sql/translate/TranslateSqlResponse.ts b/specification/sql/translate/TranslateSqlResponse.ts index 7aa353c29a..24f376c555 100644 --- a/specification/sql/translate/TranslateSqlResponse.ts +++ b/specification/sql/translate/TranslateSqlResponse.ts @@ -22,12 +22,17 @@ import { SourceConfig } from '@global/search/_types/SourceFilter' import { Dictionary } from '@spec_utils/Dictionary' import { Field, Fields } from '@_types/common' import { long } from '@_types/Numeric' +import { FieldAndFormat, QueryContainer } from '@_types/query_dsl/abstractions' +import { AggregationContainer } from '@_types/aggregations/AggregationContainer' export class Response { + // This is a subset of SearchRequest's body (same data structure in the ES code) body: { - size: long - _source: SourceConfig - fields: Array> - sort: Sort + aggregations?: Dictionary + size?: long + _source?: SourceConfig + fields?: Array + query?: QueryContainer + sort?: Sort } }