diff --git a/output/schema/schema.json b/output/schema/schema.json index f2f1a8ce43..c6375b5bb8 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -20759,7 +20759,7 @@ "kind": "instance_of", "type": { "name": "Sort", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -21765,7 +21765,7 @@ "kind": "instance_of", "type": { "name": "SortResults", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -21801,7 +21801,7 @@ "kind": "instance_of", "type": { "name": "Sort", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -24149,114 +24149,6 @@ } ] }, - { - "kind": "interface", - "name": { - "name": "FieldSort", - "namespace": "_global.search._types" - }, - "properties": [ - { - "name": "missing", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Missing", - "namespace": "_types.aggregations" - } - } - }, - { - "name": "mode", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortMode", - "namespace": "_global.search._types" - } - } - }, - { - "name": "nested", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "NestedSortValue", - "namespace": "_global.search._types" - } - } - }, - { - "name": "order", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortOrder", - "namespace": "_global.search._types" - } - } - }, - { - "name": "unmapped_type", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "FieldType", - "namespace": "_types.mapping" - } - } - }, - { - "name": "numeric_type", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "FieldSortNumericType", - "namespace": "_global.search._types" - } - } - }, - { - "name": "format", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "internal" - } - } - } - ], - "shortcutProperty": "order" - }, - { - "kind": "enum", - "members": [ - { - "name": "long" - }, - { - "name": "double" - }, - { - "name": "date" - }, - { - "name": "date_nanos" - } - ], - "name": { - "name": "FieldSortNumericType", - "namespace": "_global.search._types" - } - }, { "kind": "interface", "name": { @@ -24335,112 +24227,6 @@ "kind": "container" } }, - { - "attachedBehaviors": [ - "AdditionalProperty" - ], - "behaviors": [ - { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "Field", - "namespace": "_types" - } - }, - { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "GeoLocation", - "namespace": "_types" - } - }, - { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "GeoLocation", - "namespace": "_types" - } - } - } - ], - "kind": "union_of" - } - ], - "type": { - "name": "AdditionalProperty", - "namespace": "_spec_utils" - } - } - ], - "kind": "interface", - "name": { - "name": "GeoDistanceSort", - "namespace": "_global.search._types" - }, - "properties": [ - { - "name": "mode", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortMode", - "namespace": "_global.search._types" - } - } - }, - { - "name": "distance_type", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "GeoDistanceType", - "namespace": "_types" - } - } - }, - { - "name": "ignore_unmapped", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "internal" - } - } - }, - { - "name": "order", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortOrder", - "namespace": "_global.search._types" - } - } - }, - { - "name": "unit", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "DistanceUnit", - "namespace": "_types" - } - } - } - ] - }, { "kind": "interface", "name": { @@ -25285,7 +25071,7 @@ "kind": "instance_of", "type": { "name": "SortResults", - "namespace": "_global.search._types" + "namespace": "_types" } } } @@ -25512,7 +25298,7 @@ "kind": "instance_of", "type": { "name": "Sort", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -25692,59 +25478,6 @@ } ] }, - { - "kind": "interface", - "name": { - "name": "NestedSortValue", - "namespace": "_global.search._types" - }, - "properties": [ - { - "name": "filter", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" - } - } - }, - { - "name": "max_children", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "name": "nested", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "NestedSortValue", - "namespace": "_global.search._types" - } - } - }, - { - "name": "path", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Field", - "namespace": "_types" - } - } - } - ] - }, { "kind": "interface", "name": { @@ -26496,105 +26229,6 @@ "namespace": "_global.search._types" } }, - { - "kind": "interface", - "name": { - "name": "ScoreSort", - "namespace": "_global.search._types" - }, - "properties": [ - { - "name": "order", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortOrder", - "namespace": "_global.search._types" - } - } - } - ] - }, - { - "kind": "interface", - "name": { - "name": "ScriptSort", - "namespace": "_global.search._types" - }, - "properties": [ - { - "name": "order", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortOrder", - "namespace": "_global.search._types" - } - } - }, - { - "name": "script", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Script", - "namespace": "_types" - } - } - }, - { - "name": "type", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "ScriptSortType", - "namespace": "_global.search._types" - } - } - }, - { - "name": "mode", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortMode", - "namespace": "_global.search._types" - } - } - }, - { - "name": "nested", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "NestedSortValue", - "namespace": "_global.search._types" - } - } - } - ] - }, - { - "kind": "enum", - "members": [ - { - "name": "string" - }, - { - "name": "number" - } - ], - "name": { - "name": "ScriptSortType", - "namespace": "_global.search._types" - } - }, { "kind": "interface", "name": { @@ -26747,231 +26381,6 @@ "kind": "container" } }, - { - "kind": "type_alias", - "name": { - "name": "Sort", - "namespace": "_global.search._types" - }, - "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "SortCombinations", - "namespace": "_global.search._types" - } - }, - { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "SortCombinations", - "namespace": "_global.search._types" - } - } - } - ], - "kind": "union_of" - } - }, - { - "codegenNames": [ - "field", - "options" - ], - "kind": "type_alias", - "name": { - "name": "SortCombinations", - "namespace": "_global.search._types" - }, - "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "Field", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "SortOptions", - "namespace": "_global.search._types" - } - } - ], - "kind": "union_of" - } - }, - { - "kind": "enum", - "members": [ - { - "name": "min" - }, - { - "name": "max" - }, - { - "name": "sum" - }, - { - "name": "avg" - }, - { - "name": "median" - } - ], - "name": { - "name": "SortMode", - "namespace": "_global.search._types" - } - }, - { - "attachedBehaviors": [ - "AdditionalProperty" - ], - "behaviors": [ - { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "Field", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "FieldSort", - "namespace": "_global.search._types" - } - } - ], - "type": { - "name": "AdditionalProperty", - "namespace": "_spec_utils" - } - } - ], - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html", - "kind": "interface", - "name": { - "name": "SortOptions", - "namespace": "_global.search._types" - }, - "properties": [ - { - "name": "_score", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "ScoreSort", - "namespace": "_global.search._types" - } - } - }, - { - "name": "_doc", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "ScoreSort", - "namespace": "_global.search._types" - } - } - }, - { - "name": "_geo_distance", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "GeoDistanceSort", - "namespace": "_global.search._types" - } - } - }, - { - "name": "_script", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "ScriptSort", - "namespace": "_global.search._types" - } - } - } - ], - "variants": { - "kind": "container" - } - }, - { - "kind": "enum", - "members": [ - { - "name": "asc" - }, - { - "name": "desc" - } - ], - "name": { - "name": "SortOrder", - "namespace": "_global.search._types" - } - }, - { - "kind": "type_alias", - "name": { - "name": "SortResults", - "namespace": "_global.search._types" - }, - "type": { - "kind": "array_of", - "value": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "internal" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "internal" - } - } - ], - "kind": "union_of" - } - } - }, { "codegenNames": [ "fetch", @@ -27816,7 +27225,7 @@ "kind": "instance_of", "type": { "name": "Sort", - "namespace": "_global.search._types" + "namespace": "_types" } } } @@ -31731,6 +31140,114 @@ } ] }, + { + "kind": "interface", + "name": { + "name": "FieldSort", + "namespace": "_types" + }, + "properties": [ + { + "name": "missing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Missing", + "namespace": "_types.aggregations" + } + } + }, + { + "name": "mode", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SortMode", + "namespace": "_types" + } + } + }, + { + "name": "nested", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "NestedSortValue", + "namespace": "_types" + } + } + }, + { + "name": "order", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SortOrder", + "namespace": "_types" + } + } + }, + { + "name": "unmapped_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FieldType", + "namespace": "_types.mapping" + } + } + }, + { + "name": "numeric_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FieldSortNumericType", + "namespace": "_types" + } + } + }, + { + "name": "format", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "internal" + } + } + } + ], + "shortcutProperty": "order" + }, + { + "kind": "enum", + "members": [ + { + "name": "long" + }, + { + "name": "double" + }, + { + "name": "date" + }, + { + "name": "date_nanos" + } + ], + "name": { + "name": "FieldSortNumericType", + "namespace": "_types" + } + }, { "codegenNames": [ "long", @@ -31997,6 +31514,112 @@ "kind": "union_of" } }, + { + "attachedBehaviors": [ + "AdditionalProperty" + ], + "behaviors": [ + { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "GeoLocation", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "GeoLocation", + "namespace": "_types" + } + } + } + ], + "kind": "union_of" + } + ], + "type": { + "name": "AdditionalProperty", + "namespace": "_spec_utils" + } + } + ], + "kind": "interface", + "name": { + "name": "GeoDistanceSort", + "namespace": "_types" + }, + "properties": [ + { + "name": "mode", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SortMode", + "namespace": "_types" + } + } + }, + { + "name": "distance_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "GeoDistanceType", + "namespace": "_types" + } + } + }, + { + "name": "ignore_unmapped", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "internal" + } + } + }, + { + "name": "order", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SortOrder", + "namespace": "_types" + } + } + }, + { + "name": "unit", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DistanceUnit", + "namespace": "_types" + } + } + } + ] + }, { "kind": "enum", "members": [ @@ -32736,6 +32359,66 @@ "kind": "union_of" } }, + { + "description": "Controls how to deal with unavailable concrete indices (closed or missing), how wildcard expressions are expanded\nto actual indices (all, closed or open indices) and how to deal with wildcard expressions that resolve to no indices.", + "kind": "interface", + "name": { + "name": "IndicesOptions", + "namespace": "_types" + }, + "properties": [ + { + "description": "If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only\nmissing or closed indices. This behavior applies even if the request targets other open indices. For example,\na request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", + "name": "allow_no_indices", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "internal" + } + } + }, + { + "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", + "name": "expand_wildcards", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ExpandWildcards", + "namespace": "_types" + } + } + }, + { + "description": "If true, missing or closed indices are not included in the response.", + "name": "ignore_unavailable", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "internal" + } + } + }, + { + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "name": "ignore_throttled", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "internal" + } + } + } + ] + }, { "inherits": { "type": { @@ -33363,6 +33046,59 @@ } } }, + { + "kind": "interface", + "name": { + "name": "NestedSortValue", + "namespace": "_types" + }, + "properties": [ + { + "name": "filter", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "QueryContainer", + "namespace": "_types.query_dsl" + } + } + }, + { + "name": "max_children", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "nested", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "NestedSortValue", + "namespace": "_types" + } + } + }, + { + "name": "path", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + } + ] + }, { "kind": "interface", "name": { @@ -34307,9 +34043,6 @@ { "kind": "enum", "members": [ - { - "name": "Error" - }, { "name": "created" }, @@ -34377,6 +34110,26 @@ } } }, + { + "kind": "interface", + "name": { + "name": "ScoreSort", + "namespace": "_types" + }, + "properties": [ + { + "name": "order", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SortOrder", + "namespace": "_types" + } + } + } + ] + }, { "codegenNames": [ "inline", @@ -34496,6 +34249,85 @@ "kind": "union_of" } }, + { + "kind": "interface", + "name": { + "name": "ScriptSort", + "namespace": "_types" + }, + "properties": [ + { + "name": "order", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SortOrder", + "namespace": "_types" + } + } + }, + { + "name": "script", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Script", + "namespace": "_types" + } + } + }, + { + "name": "type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ScriptSortType", + "namespace": "_types" + } + } + }, + { + "name": "mode", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SortMode", + "namespace": "_types" + } + } + }, + { + "name": "nested", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "NestedSortValue", + "namespace": "_types" + } + } + } + ] + }, + { + "kind": "enum", + "members": [ + { + "name": "string" + }, + { + "name": "number" + } + ], + "name": { + "name": "ScriptSortType", + "namespace": "_types" + } + }, { "kind": "interface", "name": { @@ -35275,6 +35107,231 @@ } ] }, + { + "kind": "type_alias", + "name": { + "name": "Sort", + "namespace": "_types" + }, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "SortCombinations", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "SortCombinations", + "namespace": "_types" + } + } + } + ], + "kind": "union_of" + } + }, + { + "codegenNames": [ + "field", + "options" + ], + "kind": "type_alias", + "name": { + "name": "SortCombinations", + "namespace": "_types" + }, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "SortOptions", + "namespace": "_types" + } + } + ], + "kind": "union_of" + } + }, + { + "kind": "enum", + "members": [ + { + "name": "min" + }, + { + "name": "max" + }, + { + "name": "sum" + }, + { + "name": "avg" + }, + { + "name": "median" + } + ], + "name": { + "name": "SortMode", + "namespace": "_types" + } + }, + { + "attachedBehaviors": [ + "AdditionalProperty" + ], + "behaviors": [ + { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "FieldSort", + "namespace": "_types" + } + } + ], + "type": { + "name": "AdditionalProperty", + "namespace": "_spec_utils" + } + } + ], + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html", + "kind": "interface", + "name": { + "name": "SortOptions", + "namespace": "_types" + }, + "properties": [ + { + "name": "_score", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ScoreSort", + "namespace": "_types" + } + } + }, + { + "name": "_doc", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ScoreSort", + "namespace": "_types" + } + } + }, + { + "name": "_geo_distance", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "GeoDistanceSort", + "namespace": "_types" + } + } + }, + { + "name": "_script", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ScriptSort", + "namespace": "_types" + } + } + } + ], + "variants": { + "kind": "container" + } + }, + { + "kind": "enum", + "members": [ + { + "name": "asc" + }, + { + "name": "desc" + } + ], + "name": { + "name": "SortOrder", + "namespace": "_types" + } + }, + { + "kind": "type_alias", + "name": { + "name": "SortResults", + "namespace": "_types" + }, + "type": { + "kind": "array_of", + "value": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "internal" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "internal" + } + } + ], + "kind": "union_of" + } + } + }, { "kind": "interface", "name": { @@ -38414,7 +38471,7 @@ "kind": "instance_of", "type": { "name": "Sort", - "namespace": "_global.search._types" + "namespace": "_types" } } } @@ -40715,7 +40772,7 @@ "kind": "instance_of", "type": { "name": "SortOrder", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -41226,7 +41283,7 @@ "kind": "instance_of", "type": { "name": "SortOrder", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -41237,7 +41294,7 @@ "kind": "instance_of", "type": { "name": "SortOrder", - "namespace": "_global.search._types" + "namespace": "_types" } } } @@ -42173,8 +42230,8 @@ "type": { "kind": "instance_of", "type": { - "name": "MatrixStatsMode", - "namespace": "_types.aggregations" + "name": "SortMode", + "namespace": "_types" } } } @@ -42299,30 +42356,6 @@ } ] }, - { - "kind": "enum", - "members": [ - { - "name": "avg" - }, - { - "name": "min" - }, - { - "name": "max" - }, - { - "name": "sum" - }, - { - "name": "median" - } - ], - "name": { - "name": "MatrixStatsMode", - "namespace": "_types.aggregations" - } - }, { "inherits": { "type": { @@ -46013,7 +46046,7 @@ "kind": "instance_of", "type": { "name": "SortOrder", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -46033,7 +46066,7 @@ "kind": "instance_of", "type": { "name": "SortOrder", - "namespace": "_global.search._types" + "namespace": "_types" } } } @@ -46347,7 +46380,7 @@ "kind": "instance_of", "type": { "name": "Sort", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -46558,7 +46591,7 @@ "kind": "instance_of", "type": { "name": "Sort", - "namespace": "_global.search._types" + "namespace": "_types" } } } @@ -61058,37 +61091,13 @@ "type": { "kind": "instance_of", "type": { - "name": "NestedScoreMode", + "name": "ChildScoreMode", "namespace": "_types.query_dsl" } } } ] }, - { - "kind": "enum", - "members": [ - { - "name": "avg" - }, - { - "name": "sum" - }, - { - "name": "min" - }, - { - "name": "max" - }, - { - "name": "none" - } - ], - "name": { - "name": "NestedScoreMode", - "namespace": "_types.query_dsl" - } - }, { "inherits": { "type": { @@ -65147,7 +65156,7 @@ "kind": "instance_of", "type": { "name": "SortResults", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -65183,7 +65192,7 @@ "kind": "instance_of", "type": { "name": "Sort", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -104807,7 +104816,7 @@ "kind": "instance_of", "type": { "name": "SortOrder", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -109420,315 +109429,256 @@ "namespace": "_types" } } - }, - { - "name": "delayed_data_check_config", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "DelayedDataCheckConfig", - "namespace": "ml._types" - } - } - }, - { - "name": "runtime_mappings", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RuntimeFields", - "namespace": "_types.mapping" - } - } - }, - { - "name": "indices_options", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "DatafeedIndicesOptions", - "namespace": "ml._types" - } - } - } - ] - }, - { - "kind": "interface", - "name": { - "name": "DatafeedConfig", - "namespace": "ml._types" - }, - "properties": [ - { - "aliases": [ - "aggs" - ], - "description": "If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data.", - "name": "aggregations", - "required": false, - "type": { - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "internal" - } - }, - "kind": "dictionary_of", - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "AggregationContainer", - "namespace": "_types.aggregations" - } - } - } - }, - { - "description": "Datafeeds might be required to search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of these time chunks are calculated and is an advanced configuration option.", - "name": "chunking_config", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "ChunkingConfig", - "namespace": "ml._types" - } - } - }, - { - "description": "A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. The default value is the job identifier.", - "name": "datafeed_id", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" - } - } - }, - { - "description": "Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally search over indices that have already been read in an effort to determine whether any data has subsequently been added to the index. If missing data is found, it is a good indication that the `query_delay` option is set too low and the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time datafeeds.", - "name": "delayed_data_check_config", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "DelayedDataCheckConfig", - "namespace": "ml._types" - } - } - }, - { - "description": "The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. For example: `150s`. When `frequency` is shorter than the bucket span, interim results for the last (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value must be divisible by the interval of the date histogram aggregation.", - "name": "frequency", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Timestamp", - "namespace": "_types" - } - } - }, - { - "name": "indexes", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "internal" - } - } - } - }, - { - "description": "An array of index names. Wildcards are supported. If any indices are in remote clusters, the machine learning nodes must have the `remote_cluster_client` role.", - "name": "indices", - "required": true, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "internal" - } - } - } - }, - { - "description": "Specifies index expansion options that are used during search.", - "name": "indices_options", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "DatafeedIndicesOptions", - "namespace": "ml._types" - } - } - }, - { - "name": "job_id", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" - } - } - }, - { - "description": "If a real-time datafeed has never seen any data (including during any initial training period) then it will automatically stop itself and close its associated job after this many real-time searches that return no documents. In other words, it will stop after `frequency` times `max_empty_searches` of real-time operation. If not set then a datafeed with no end time that sees no data will remain started until it is explicitly stopped.", - "name": "max_empty_searches", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "description": "The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch.", - "name": "query", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" - } - } - }, - { - "description": "The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default value is randomly selected between `60s` and `120s`. This randomness improves the query performance when there are multiple jobs running on the same node.", - "name": "query_delay", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Timestamp", - "namespace": "_types" - } - } - }, - { - "description": "Specifies runtime fields for the datafeed search.", - "name": "runtime_mappings", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RuntimeFields", - "namespace": "_types.mapping" - } - } - }, - { - "description": "Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. The detector configuration objects in a job can contain functions that use these script fields.", - "name": "script_fields", - "required": false, - "type": { - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "internal" - } - }, - "kind": "dictionary_of", - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "ScriptField", - "namespace": "_types" - } - } - } - }, - { - "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. The maximum value is the value of `index.max_result_window`, which is 10,000 by default.", - "name": "scroll_size", - "required": false, - "serverDefault": 1000, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } + }, + { + "name": "delayed_data_check_config", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DelayedDataCheckConfig", + "namespace": "ml._types" + } + } + }, + { + "name": "runtime_mappings", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "RuntimeFields", + "namespace": "_types.mapping" + } + } + }, + { + "name": "indices_options", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "IndicesOptions", + "namespace": "_types" + } + } } ] }, { "kind": "interface", "name": { - "name": "DatafeedIndicesOptions", + "name": "DatafeedConfig", "namespace": "ml._types" }, "properties": [ { - "description": "If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only\nmissing or closed indices. This behavior applies even if the request targets other open indices. For example,\na request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", - "name": "allow_no_indices", + "aliases": [ + "aggs" + ], + "description": "If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data.", + "name": "aggregations", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "internal" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "AggregationContainer", + "namespace": "_types.aggregations" + } + } + } + }, + { + "description": "Datafeeds might be required to search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of these time chunks are calculated and is an advanced configuration option.", + "name": "chunking_config", "required": false, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "internal" + "name": "ChunkingConfig", + "namespace": "ml._types" } } }, { - "description": "Type of index that wildcard patterns can match. If the request can target data streams, this argument\ndetermines whether wildcard expressions match hidden data streams. Supports comma-separated values,\nsuch as `open,hidden`.", - "name": "expand_wildcards", + "description": "A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. The default value is the job identifier.", + "name": "datafeed_id", "required": false, "type": { "kind": "instance_of", "type": { - "name": "ExpandWildcards", + "name": "Id", "namespace": "_types" } } }, { - "description": "If true, missing or closed indices are not included in the response.", - "name": "ignore_unavailable", + "description": "Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally search over indices that have already been read in an effort to determine whether any data has subsequently been added to the index. If missing data is found, it is a good indication that the `query_delay` option is set too low and the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time datafeeds.", + "name": "delayed_data_check_config", "required": false, - "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "internal" + "name": "DelayedDataCheckConfig", + "namespace": "ml._types" } } }, { - "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", - "name": "ignore_throttled", + "description": "The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. For example: `150s`. When `frequency` is shorter than the bucket span, interim results for the last (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value must be divisible by the interval of the date histogram aggregation.", + "name": "frequency", "required": false, - "serverDefault": true, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "internal" + "name": "Timestamp", + "namespace": "_types" + } + } + }, + { + "name": "indexes", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "internal" + } + } + } + }, + { + "description": "An array of index names. Wildcards are supported. If any indices are in remote clusters, the machine learning nodes must have the `remote_cluster_client` role.", + "name": "indices", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "internal" + } + } + } + }, + { + "description": "Specifies index expansion options that are used during search.", + "name": "indices_options", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "IndicesOptions", + "namespace": "_types" + } + } + }, + { + "name": "job_id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "description": "If a real-time datafeed has never seen any data (including during any initial training period) then it will automatically stop itself and close its associated job after this many real-time searches that return no documents. In other words, it will stop after `frequency` times `max_empty_searches` of real-time operation. If not set then a datafeed with no end time that sees no data will remain started until it is explicitly stopped.", + "name": "max_empty_searches", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch.", + "name": "query", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "QueryContainer", + "namespace": "_types.query_dsl" + } + } + }, + { + "description": "The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default value is randomly selected between `60s` and `120s`. This randomness improves the query performance when there are multiple jobs running on the same node.", + "name": "query_delay", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Timestamp", + "namespace": "_types" + } + } + }, + { + "description": "Specifies runtime fields for the datafeed search.", + "name": "runtime_mappings", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "RuntimeFields", + "namespace": "_types.mapping" + } + } + }, + { + "description": "Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. The detector configuration objects in a job can contain functions that use these script fields.", + "name": "script_fields", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "internal" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "ScriptField", + "namespace": "_types" + } + } + } + }, + { + "description": "The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. The maximum value is the value of `index.max_result_window`, which is 10,000 by default.", + "name": "scroll_size", + "required": false, + "serverDefault": 1000, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" } } } @@ -121652,8 +121602,8 @@ "type": { "kind": "instance_of", "type": { - "name": "DatafeedIndicesOptions", - "namespace": "ml._types" + "name": "IndicesOptions", + "namespace": "_types" } } }, @@ -121942,8 +121892,8 @@ "type": { "kind": "instance_of", "type": { - "name": "DatafeedIndicesOptions", - "namespace": "ml._types" + "name": "IndicesOptions", + "namespace": "_types" } } }, @@ -124460,8 +124410,8 @@ "type": { "kind": "instance_of", "type": { - "name": "DatafeedIndicesOptions", - "namespace": "ml._types" + "name": "IndicesOptions", + "namespace": "_types" } } }, @@ -124738,8 +124688,8 @@ "type": { "kind": "instance_of", "type": { - "name": "DatafeedIndicesOptions", - "namespace": "ml._types" + "name": "IndicesOptions", + "namespace": "_types" } } }, @@ -143603,7 +143553,7 @@ "kind": "instance_of", "type": { "name": "Sort", - "namespace": "_global.search._types" + "namespace": "_types" } } } @@ -149057,59 +149007,6 @@ } ] }, - { - "kind": "interface", - "name": { - "name": "IndicesOptions", - "namespace": "watcher._types" - }, - "properties": [ - { - "name": "allow_no_indices", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "internal" - } - } - }, - { - "name": "expand_wildcards", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "ExpandWildcards", - "namespace": "_types" - } - } - }, - { - "name": "ignore_unavailable", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "internal" - } - } - }, - { - "name": "ignore_throttled", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "internal" - } - } - } - ] - }, { "kind": "interface", "name": { @@ -149933,7 +149830,7 @@ "kind": "instance_of", "type": { "name": "IndicesOptions", - "namespace": "watcher._types" + "namespace": "_types" } } }, @@ -151863,7 +151760,7 @@ "kind": "instance_of", "type": { "name": "Sort", - "namespace": "_global.search._types" + "namespace": "_types" } } }, @@ -151875,7 +151772,7 @@ "kind": "instance_of", "type": { "name": "SortResults", - "namespace": "_global.search._types" + "namespace": "_types" } } } @@ -156260,7 +156157,7 @@ ] }, { - "description": "In some places in the specification an object consists of a static set of properties and a single additional property\nwith an arbitrary name but a statically defined type. This is typically used for configurations associated\nto a single field. Meaning that object should theoretically extend SingleKeyDictionary but expose\na set of known keys. And possibly the object might already be part of an object graph and have a parent class.\nThis puts it into a bind that needs a client specific solution.\nWe therefore document the requirement to accept a single unknown property with this interface.", + "description": "In some places in the specification an object consists of the union of a set of known properties\nand a set of runtime injected properties. Meaning that object should theoretically extend Dictionary but expose\na set of known keys and possibly. The object might already be part of an object graph and have a parent class.\nThis puts it into a bind that needs a client specific solution.\nWe therefore document the requirement to behave like a dictionary for unknown properties with this interface.", "generics": [ { "name": "TKey", @@ -156273,13 +156170,13 @@ ], "kind": "interface", "name": { - "name": "AdditionalProperty", + "name": "AdditionalProperties", "namespace": "_spec_utils" }, "properties": [] }, { - "description": "In some places in the specification an object consists of the union of a set of known properties\nand a set of runtime injected properties. Meaning that object should theoretically extend Dictionary but expose\na set of known keys and possibly. The object might already be part of an object graph and have a parent class.\nThis puts it into a bind that needs a client specific solution.\nWe therefore document the requirement to behave like a dictionary for unknown properties with this interface.", + "description": "In some places in the specification an object consists of a static set of properties and a single additional property\nwith an arbitrary name but a statically defined type. This is typically used for configurations associated\nto a single field. Meaning that object should theoretically extend SingleKeyDictionary but expose\na set of known keys. And possibly the object might already be part of an object graph and have a parent class.\nThis puts it into a bind that needs a client specific solution.\nWe therefore document the requirement to accept a single unknown property with this interface.", "generics": [ { "name": "TKey", @@ -156292,7 +156189,7 @@ ], "kind": "interface", "name": { - "name": "AdditionalProperties", + "name": "AdditionalProperty", "namespace": "_spec_utils" }, "properties": [] diff --git a/output/typescript/types.ts b/output/typescript/types.ts index d476b72a78..194376884e 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -858,7 +858,7 @@ export interface ReindexSource { remote?: ReindexRemoteSource size?: integer slice?: SlicedScroll - sort?: SearchSort + sort?: Sort _source?: Fields runtime_mappings?: MappingRuntimeFields } @@ -1008,10 +1008,10 @@ export interface SearchRequest extends RequestBase { query?: QueryDslQueryContainer rescore?: SearchRescore | SearchRescore[] script_fields?: Record - search_after?: SearchSortResults + search_after?: SortResults size?: integer slice?: SlicedScroll - sort?: SearchSort + sort?: Sort _source?: SearchSourceConfig fields?: (QueryDslFieldAndFormat | Field)[] suggest?: SearchSuggester @@ -1193,18 +1193,6 @@ export interface SearchFieldCollapse { max_concurrent_group_searches?: integer } -export interface SearchFieldSort { - missing?: AggregationsMissing - mode?: SearchSortMode - nested?: SearchNestedSortValue - order?: SearchSortOrder - unmapped_type?: MappingFieldType - numeric_type?: SearchFieldSortNumericType - format?: string -} - -export type SearchFieldSortNumericType = 'long' | 'double' | 'date' | 'date_nanos' - export interface SearchFieldSuggester { completion?: SearchCompletionSuggester phrase?: SearchPhraseSuggester @@ -1214,16 +1202,6 @@ export interface SearchFieldSuggester { text?: string } -export interface SearchGeoDistanceSortKeys { - mode?: SearchSortMode - distance_type?: GeoDistanceType - ignore_unmapped?: boolean - order?: SearchSortOrder - unit?: DistanceUnit -} -export type SearchGeoDistanceSort = SearchGeoDistanceSortKeys - & { [property: string]: GeoLocation | GeoLocation[] | SearchSortMode | GeoDistanceType | boolean | SearchSortOrder | DistanceUnit } - export interface SearchHighlight { fields: Record type?: SearchHighlighterType @@ -1300,7 +1278,7 @@ export interface SearchHit { _seq_no?: SequenceNumber _primary_term?: long _version?: VersionNumber - sort?: SearchSortResults + sort?: SortResults } export interface SearchHitsMetadata { @@ -1321,7 +1299,7 @@ export interface SearchInnerHits { script_fields?: Record seq_no_primary_term?: boolean fields?: Fields - sort?: SearchSort + sort?: Sort _source?: SearchSourceConfig stored_field?: Fields track_scores?: boolean @@ -1348,13 +1326,6 @@ export interface SearchNestedIdentity { _nested?: SearchNestedIdentity } -export interface SearchNestedSortValue { - filter?: QueryDslQueryContainer - max_children?: integer - nested?: SearchNestedSortValue - path: Field -} - export interface SearchPhraseSuggestCollate { params?: Record prune?: boolean @@ -1445,20 +1416,6 @@ export interface SearchRescoreQuery { export type SearchScoreMode = 'avg' | 'max' | 'min' | 'multiply' | 'total' -export interface SearchScoreSort { - order?: SearchSortOrder -} - -export interface SearchScriptSort { - order?: SearchSortOrder - script: Script - type?: SearchScriptSortType - mode?: SearchSortMode - nested?: SearchNestedSortValue -} - -export type SearchScriptSortType = 'string' | 'number' - export interface SearchSearchProfile { collector: SearchCollector[] query: SearchQueryProfile[] @@ -1478,25 +1435,6 @@ export interface SearchSmoothingModelContainer { stupid_backoff?: SearchStupidBackoffSmoothingModel } -export type SearchSort = SearchSortCombinations | SearchSortCombinations[] - -export type SearchSortCombinations = Field | SearchSortOptions - -export type SearchSortMode = 'min' | 'max' | 'sum' | 'avg' | 'median' - -export interface SearchSortOptionsKeys { - _score?: SearchScoreSort - _doc?: SearchScoreSort - _geo_distance?: SearchGeoDistanceSort - _script?: SearchScriptSort -} -export type SearchSortOptions = SearchSortOptionsKeys - & { [property: string]: SearchFieldSort | SearchSortOrder | SearchScoreSort | SearchGeoDistanceSort | SearchScriptSort } - -export type SearchSortOrder = 'asc' | 'desc' - -export type SearchSortResults = (long | double | string | null)[] - export type SearchSourceConfig = boolean | SearchSourceFilter | Fields export type SearchSourceConfigParam = boolean | Fields @@ -1596,7 +1534,7 @@ export interface SearchMvtRequest extends RequestBase { query?: QueryDslQueryContainer runtime_mappings?: MappingRuntimeFields size?: integer - sort?: SearchSort + sort?: Sort } } @@ -1996,6 +1934,18 @@ export interface FieldSizeUsage { size_in_bytes: long } +export interface FieldSort { + missing?: AggregationsMissing + mode?: SortMode + nested?: NestedSortValue + order?: SortOrder + unmapped_type?: MappingFieldType + numeric_type?: FieldSortNumericType + format?: string +} + +export type FieldSortNumericType = 'long' | 'double' | 'date' | 'date_nanos' + export type FieldValue = long | double | string | boolean export interface FielddataStats { @@ -2018,6 +1968,16 @@ export type Fuzziness = string | integer export type GeoBounds = CoordsGeoBounds | TopLeftBottomRightGeoBounds | TopRightBottomLeftGeoBounds | WktGeoBounds +export interface GeoDistanceSortKeys { + mode?: SortMode + distance_type?: GeoDistanceType + ignore_unmapped?: boolean + order?: SortOrder + unit?: DistanceUnit +} +export type GeoDistanceSort = GeoDistanceSortKeys + & { [property: string]: GeoLocation | GeoLocation[] | SortMode | GeoDistanceType | boolean | SortOrder | DistanceUnit } + export type GeoDistanceType = 'arc' | 'plane' export type GeoHash = string @@ -2093,6 +2053,13 @@ export interface IndexingStats { export type Indices = IndexName | IndexName[] +export interface IndicesOptions { + allow_no_indices?: boolean + expand_wildcards?: ExpandWildcards + ignore_unavailable?: boolean + ignore_throttled?: boolean +} + export interface IndicesResponseBase extends AcknowledgedResponseBase { _shards?: ShardStatistics } @@ -2160,6 +2127,13 @@ export type Names = Name | Name[] export type Namespace = string +export interface NestedSortValue { + filter?: QueryDslQueryContainer + max_children?: integer + nested?: NestedSortValue + path: Field +} + export interface NodeAttributes { attributes: Record ephemeral_id: Id @@ -2262,7 +2236,7 @@ export interface RequestCacheStats { miss_count: long } -export type Result = 'Error' | 'created' | 'updated' | 'deleted' | 'not_found' | 'noop' +export type Result = 'created' | 'updated' | 'deleted' | 'not_found' | 'noop' export interface Retries { bulk: long @@ -2271,6 +2245,10 @@ export interface Retries { export type Routing = string +export interface ScoreSort { + order?: SortOrder +} + export type Script = InlineScript | string | StoredScriptId export interface ScriptBase { @@ -2284,6 +2262,16 @@ export interface ScriptField { export type ScriptLanguage = BuiltinScriptLanguage | string +export interface ScriptSort { + order?: SortOrder + script: Script + type?: ScriptSortType + mode?: SortMode + nested?: NestedSortValue +} + +export type ScriptSortType = 'string' | 'number' + export interface ScriptTransform { lang: string params: Record @@ -2372,6 +2360,25 @@ export interface SlicedScroll { max: integer } +export type Sort = SortCombinations | SortCombinations[] + +export type SortCombinations = Field | SortOptions + +export type SortMode = 'min' | 'max' | 'sum' | 'avg' | 'median' + +export interface SortOptionsKeys { + _score?: ScoreSort + _doc?: ScoreSort + _geo_distance?: GeoDistanceSort + _script?: ScriptSort +} +export type SortOptions = SortOptionsKeys + & { [property: string]: FieldSort | SortOrder | ScoreSort | GeoDistanceSort | ScriptSort } + +export type SortOrder = 'asc' | 'desc' + +export type SortResults = (long | double | string | null)[] + export interface StoreStats { size?: ByteSize size_in_bytes: integer @@ -2676,7 +2683,7 @@ export interface AggregationsBucketSortAggregation extends AggregationsAggregati from?: integer gap_policy?: AggregationsGapPolicy size?: integer - sort?: SearchSort + sort?: Sort } export type AggregationsBuckets = Record | TBucket[] @@ -2950,7 +2957,7 @@ export interface AggregationsGeoLineAggregation { point: AggregationsGeoLinePoint sort: AggregationsGeoLineSort include_sort?: boolean - sort_order?: SearchSortOrder + sort_order?: SortOrder size?: integer } @@ -3024,8 +3031,8 @@ export type AggregationsHistogramBucket = AggregationsHistogramBucketKeys & { [property: string]: AggregationsAggregate | string | double | long } export interface AggregationsHistogramOrder { - _count?: SearchSortOrder - _key?: SearchSortOrder + _count?: SortOrder + _key?: SortOrder } export interface AggregationsHoltLinearModelSettings { @@ -3149,7 +3156,7 @@ export interface AggregationsMatrixStatsAggregate extends AggregationsAggregateB } export interface AggregationsMatrixStatsAggregation extends AggregationsMatrixAggregation { - mode?: AggregationsMatrixStatsMode + mode?: SortMode } export interface AggregationsMatrixStatsFields { @@ -3163,8 +3170,6 @@ export interface AggregationsMatrixStatsFields { correlation: Record } -export type AggregationsMatrixStatsMode = 'avg' | 'min' | 'max' | 'sum' | 'median' - export interface AggregationsMaxAggregate extends AggregationsSingleMetricAggregateBase { } @@ -3608,7 +3613,7 @@ 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 type AggregationsTermsAggregationOrder = Record | Record[] export interface AggregationsTermsBucketBase extends AggregationsMultiBucketBase { doc_count_error?: long @@ -3640,7 +3645,7 @@ export interface AggregationsTopHitsAggregation extends AggregationsMetricAggreg highlight?: SearchHighlight script_fields?: Record size?: integer - sort?: SearchSort + sort?: Sort _source?: SearchSourceConfig stored_fields?: Fields track_scores?: boolean @@ -3659,7 +3664,7 @@ export interface AggregationsTopMetricsAggregate extends AggregationsMultiBucket export interface AggregationsTopMetricsAggregation extends AggregationsMetricAggregationBase { metrics?: AggregationsTopMetricsValue | AggregationsTopMetricsValue[] size?: integer - sort?: SearchSort + sort?: Sort } export interface AggregationsTopMetricsBucketKeys extends AggregationsMultiBucketBase { @@ -5223,11 +5228,9 @@ export interface QueryDslNestedQuery extends QueryDslQueryBase { inner_hits?: SearchInnerHits path: Field query: QueryDslQueryContainer - score_mode?: QueryDslNestedScoreMode + score_mode?: QueryDslChildScoreMode } -export type QueryDslNestedScoreMode = 'avg' | 'sum' | 'min' | 'max' | 'none' - export interface QueryDslNumberRangeQuery extends QueryDslRangeQueryBase { gt?: double gte?: double @@ -5689,10 +5692,10 @@ export interface AsyncSearchSubmitRequest extends RequestBase { query?: QueryDslQueryContainer rescore?: SearchRescore | SearchRescore[] script_fields?: Record - search_after?: SearchSortResults + search_after?: SortResults size?: integer slice?: SlicedScroll - sort?: SearchSort + sort?: Sort _source?: SearchSourceConfig fields?: (QueryDslFieldAndFormat | Field)[] suggest?: SearchSuggester @@ -10558,7 +10561,7 @@ export type IngestShapeType = 'geo_shape' | 'shape' export interface IngestSortProcessor extends IngestProcessorBase { field: Field - order: SearchSortOrder + order: SortOrder target_field: Field } @@ -11067,7 +11070,7 @@ export interface MlDatafeed { scroll_size?: integer delayed_data_check_config: MlDelayedDataCheckConfig runtime_mappings?: MappingRuntimeFields - indices_options?: MlDatafeedIndicesOptions + indices_options?: IndicesOptions } export interface MlDatafeedConfig { @@ -11079,7 +11082,7 @@ export interface MlDatafeedConfig { frequency?: Timestamp indexes?: string[] indices: string[] - indices_options?: MlDatafeedIndicesOptions + indices_options?: IndicesOptions job_id?: Id max_empty_searches?: integer query: QueryDslQueryContainer @@ -11089,13 +11092,6 @@ export interface MlDatafeedConfig { scroll_size?: integer } -export interface MlDatafeedIndicesOptions { - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - ignore_unavailable?: boolean - ignore_throttled?: boolean -} - export type MlDatafeedState = 'started' | 'stopped' | 'starting' | 'stopping' export interface MlDatafeedStats { @@ -12450,7 +12446,7 @@ export interface MlPutDatafeedRequest extends RequestBase { frequency?: Time indices?: string[] indexes?: string[] - indices_options?: MlDatafeedIndicesOptions + indices_options?: IndicesOptions job_id?: Id max_empty_searches?: integer query?: QueryDslQueryContainer @@ -12469,7 +12465,7 @@ export interface MlPutDatafeedResponse { frequency: Time indices: string[] job_id: Id - indices_options?: MlDatafeedIndicesOptions + indices_options?: IndicesOptions max_empty_searches: integer query: QueryDslQueryContainer query_delay: Time @@ -12757,7 +12753,7 @@ export interface MlUpdateDatafeedRequest extends RequestBase { frequency?: Time indices?: string[] indexes?: string[] - indices_options?: MlDatafeedIndicesOptions + indices_options?: IndicesOptions max_empty_searches?: integer query?: QueryDslQueryContainer query_delay?: Time @@ -12775,7 +12771,7 @@ export interface MlUpdateDatafeedResponse { frequency: Time indices: string[] job_id: Id - indices_options?: MlDatafeedIndicesOptions + indices_options?: IndicesOptions max_empty_searches: integer query: QueryDslQueryContainer query_delay: Time @@ -14942,7 +14938,7 @@ export interface SqlTranslateResponse { size: long _source: SearchSourceConfig fields: Record[] - sort: SearchSort + sort: Sort } export interface SslCertificatesCertificateInformation { @@ -15564,13 +15560,6 @@ export interface WatcherIndexResultSummary { type?: Type } -export interface WatcherIndicesOptions { - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - ignore_unavailable?: boolean - ignore_throttled?: boolean -} - export interface WatcherInputContainer { chain?: WatcherChainInput http?: WatcherHttpInput @@ -15674,7 +15663,7 @@ export interface WatcherSearchInputRequestBody { export interface WatcherSearchInputRequestDefinition { body?: WatcherSearchInputRequestBody indices?: IndexName[] - indices_options?: WatcherIndicesOptions + indices_options?: IndicesOptions search_type?: SearchType template?: SearchTemplateRequest rest_total_hits_as_int?: boolean @@ -15903,8 +15892,8 @@ export interface WatcherQueryWatchesRequest extends RequestBase { from?: integer size?: integer query?: QueryDslQueryContainer - sort?: SearchSort - search_after?: SearchSortResults + sort?: Sort + search_after?: SortResults } } @@ -16427,11 +16416,11 @@ export interface XpackUsageWatcherWatchTriggerSchedule extends XpackUsageCounter _all: XpackUsageCounter } -export interface SpecUtilsAdditionalProperty { +export interface SpecUtilsAdditionalProperties { [key: string]: never } -export interface SpecUtilsAdditionalProperties { +export interface SpecUtilsAdditionalProperty { [key: string]: never } diff --git a/specification/_global/reindex/types.ts b/specification/_global/reindex/types.ts index 9e4c5e12ed..b637ff44fb 100644 --- a/specification/_global/reindex/types.ts +++ b/specification/_global/reindex/types.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Sort } from '@global/search/_types/sort' +import { Sort } from '@_types/sort' import { Fields, IndexName, diff --git a/specification/_global/search/SearchRequest.ts b/specification/_global/search/SearchRequest.ts index b1cee660e7..84050aa4f0 100644 --- a/specification/_global/search/SearchRequest.ts +++ b/specification/_global/search/SearchRequest.ts @@ -41,11 +41,11 @@ import { FieldCollapse } from './_types/FieldCollapse' import { Highlight } from './_types/highlighting' import { PointInTimeReference } from './_types/PointInTimeReference' import { Rescore } from './_types/rescoring' -import { Sort, SortResults } from './_types/sort' import { SourceConfigParam, SourceConfig } from './_types/SourceFilter' import { Suggester } from './_types/suggester' import { TrackHits } from '@global/search/_types/hits' import { Operator } from '@_types/query_dsl/Operator' +import { Sort, SortResults } from '@_types/sort' /** * @rest_spec_name search diff --git a/specification/_global/search/_types/hits.ts b/specification/_global/search/_types/hits.ts index b00361cfdc..f82475b304 100644 --- a/specification/_global/search/_types/hits.ts +++ b/specification/_global/search/_types/hits.ts @@ -34,9 +34,9 @@ import { double, integer, long } from '@_types/Numeric' import { ScriptField } from '@_types/Scripting' import { FieldCollapse } from './FieldCollapse' import { Highlight } from './highlighting' -import { Sort, SortResults } from './sort' import { SourceConfig } from './SourceFilter' import { FieldAndFormat } from '@_types/query_dsl/abstractions' +import { Sort, SortResults } from '@_types/sort' export class Hit { _index: IndexName diff --git a/specification/_global/search_mvt/SearchMvtRequest.ts b/specification/_global/search_mvt/SearchMvtRequest.ts index 244edfce87..b0738f0e92 100644 --- a/specification/_global/search_mvt/SearchMvtRequest.ts +++ b/specification/_global/search_mvt/SearchMvtRequest.ts @@ -23,7 +23,7 @@ import { Field, Fields, Indices } from '@_types/common' import { AggregationContainer } from '@_types/aggregations/AggregationContainer' import { GridType } from './_types/GridType' import { Coordinate } from './_types/Coordinate' -import { Sort } from '@global/search/_types/sort' +import { Sort } from '@_types/sort' import { QueryContainer } from '@_types/query_dsl/abstractions' import { RuntimeFields } from '@_types/mapping/RuntimeFields' import { integer } from '@_types/Numeric' diff --git a/specification/_types/Result.ts b/specification/_types/Result.ts index eace2cb526..200791b166 100644 --- a/specification/_types/Result.ts +++ b/specification/_types/Result.ts @@ -18,7 +18,6 @@ */ export enum Result { - Error = 0, created = 1, updated = 2, deleted = 3, diff --git a/specification/_types/aggregations/bucket.ts b/specification/_types/aggregations/bucket.ts index 8394cc1c90..fbb481a13c 100644 --- a/specification/_types/aggregations/bucket.ts +++ b/specification/_types/aggregations/bucket.ts @@ -17,7 +17,7 @@ * under the License. */ -import { SortOrder } from '@global/search/_types/sort' +import { SortOrder } from '@_types/sort' import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { Field, RelationName, Fields } from '@_types/common' diff --git a/specification/_types/aggregations/matrix.ts b/specification/_types/aggregations/matrix.ts index 9626b6aae6..0ea8bcdb99 100644 --- a/specification/_types/aggregations/matrix.ts +++ b/specification/_types/aggregations/matrix.ts @@ -21,6 +21,7 @@ import { Dictionary } from '@spec_utils/Dictionary' import { Fields, Field } from '@_types/common' import { double } from '@_types/Numeric' import { Aggregation } from './Aggregation' +import { SortMode } from '@_types/sort' export class MatrixAggregation extends Aggregation { fields?: Fields @@ -28,13 +29,5 @@ export class MatrixAggregation extends Aggregation { } export class MatrixStatsAggregation extends MatrixAggregation { - mode?: MatrixStatsMode -} - -export enum MatrixStatsMode { - avg = 0, - min = 1, - max = 2, - sum = 3, - median = 4 + mode?: SortMode } diff --git a/specification/_types/aggregations/metric.ts b/specification/_types/aggregations/metric.ts index 2aedf9b7b2..223e85886b 100644 --- a/specification/_types/aggregations/metric.ts +++ b/specification/_types/aggregations/metric.ts @@ -18,7 +18,7 @@ */ import { Highlight } from '@global/search/_types/highlighting' -import { SortOrder, Sort } from '@global/search/_types/sort' +import { SortOrder, Sort } from '@_types/sort' import { SourceConfig } from '@global/search/_types/SourceFilter' import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' diff --git a/specification/_types/aggregations/pipeline.ts b/specification/_types/aggregations/pipeline.ts index 05744e62ed..ad6efde1dc 100644 --- a/specification/_types/aggregations/pipeline.ts +++ b/specification/_types/aggregations/pipeline.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Sort } from '@global/search/_types/sort' +import { Sort } from '@_types/sort' import { Dictionary } from '@spec_utils/Dictionary' import { Name, Field, EmptyObject } from '@_types/common' import { integer, double, float } from '@_types/Numeric' diff --git a/specification/_types/common.ts b/specification/_types/common.ts index 8fbfd166db..3f3add2130 100644 --- a/specification/_types/common.ts +++ b/specification/_types/common.ts @@ -284,3 +284,32 @@ export class InlineGet _routing?: Routing _source: TDocument } + +/** + * Controls how to deal with unavailable concrete indices (closed or missing), how wildcard expressions are expanded + * to actual indices (all, closed or open indices) and how to deal with wildcard expressions that resolve to no indices. + */ +export class IndicesOptions { + /** + * If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only + * missing or closed indices. This behavior applies even if the request targets other open indices. For example, + * a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + */ + allow_no_indices?: boolean + /** + * Type of index that wildcard patterns can match. If the request can target data streams, this argument + * determines whether wildcard expressions match hidden data streams. Supports comma-separated values, + * such as `open,hidden`. + */ + expand_wildcards?: ExpandWildcards + /** + * If true, missing or closed indices are not included in the response. + * @server_default false + */ + ignore_unavailable?: boolean + /** + * If true, concrete, expanded or aliased indices are ignored when frozen. + * @server_default true + */ + ignore_throttled?: boolean +} diff --git a/specification/_types/query_dsl/joining.ts b/specification/_types/query_dsl/joining.ts index fe60976d66..ca5ced6b99 100644 --- a/specification/_types/query_dsl/joining.ts +++ b/specification/_types/query_dsl/joining.ts @@ -22,11 +22,19 @@ import { Field, Id, RelationName } from '@_types/common' import { integer } from '@_types/Numeric' import { QueryBase, QueryContainer } from './abstractions' +/** + * How to aggregate multiple child hit scores into a single parent score. + */ export enum ChildScoreMode { + /* Do no scoring. */ none = 0, + /* Parent hit's score is the average of all child scores. */ avg = 1, + /* Parent hit's score is the max of all child scores. */ sum = 2, + /* Parent hit's score is the sum of all child scores. */ max = 3, + /* Parent hit's score is the min of all child scores. */ min = 4 } @@ -59,15 +67,7 @@ export class NestedQuery extends QueryBase { path: Field query: QueryContainer /** @server_default 'avg' */ - score_mode?: NestedScoreMode -} - -export enum NestedScoreMode { - avg = 0, - sum = 1, - min = 2, - max = 3, - none = 4 + score_mode?: ChildScoreMode } export class ParentIdQuery extends QueryBase { diff --git a/specification/_global/search/_types/sort.ts b/specification/_types/sort.ts similarity index 96% rename from specification/_global/search/_types/sort.ts rename to specification/_types/sort.ts index 2394aff99f..77b483001c 100644 --- a/specification/_global/search/_types/sort.ts +++ b/specification/_types/sort.ts @@ -98,6 +98,9 @@ export type Sort = SortCombinations | SortCombinations[] export type SortResults = Array +/** + * Defines what values to pick in the case a document contains multiple values for a particular field. + */ export enum SortMode { min = 0, max = 1, diff --git a/specification/async_search/submit/AsyncSearchSubmitRequest.ts b/specification/async_search/submit/AsyncSearchSubmitRequest.ts index f6fe0a47a4..2191c83d01 100644 --- a/specification/async_search/submit/AsyncSearchSubmitRequest.ts +++ b/specification/async_search/submit/AsyncSearchSubmitRequest.ts @@ -41,7 +41,7 @@ import { FieldCollapse } from '@global/search/_types/FieldCollapse' import { Highlight } from '@global/search/_types/highlighting' import { PointInTimeReference } from '@global/search/_types/PointInTimeReference' import { Rescore } from '@global/search/_types/rescoring' -import { Sort, SortResults } from '@global/search/_types/sort' +import { Sort, SortResults } from '@_types/sort' import { SourceConfigParam, SourceConfig diff --git a/specification/ingest/_types/Processors.ts b/specification/ingest/_types/Processors.ts index b046b0cffd..0a9022a6ad 100644 --- a/specification/ingest/_types/Processors.ts +++ b/specification/ingest/_types/Processors.ts @@ -17,7 +17,7 @@ * under the License. */ -import { SortOrder } from '@global/search/_types/sort' +import { SortOrder } from '@_types/sort' import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { Field, Fields, Id, Name } from '@_types/common' diff --git a/specification/ml/_types/Datafeed.ts b/specification/ml/_types/Datafeed.ts index 509fd5b5b2..9daaddd56d 100644 --- a/specification/ml/_types/Datafeed.ts +++ b/specification/ml/_types/Datafeed.ts @@ -19,7 +19,7 @@ import { Dictionary } from '@spec_utils/Dictionary' import { AggregationContainer } from '@_types/aggregations/AggregationContainer' -import { ExpandWildcards, Id, Indices } from '@_types/common' +import { ExpandWildcards, Id, Indices, IndicesOptions } from '@_types/common' import { RuntimeFields } from '@_types/mapping/RuntimeFields' import { double, integer, long } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' @@ -43,7 +43,7 @@ export class Datafeed { scroll_size?: integer delayed_data_check_config: DelayedDataCheckConfig runtime_mappings?: RuntimeFields - indices_options?: DatafeedIndicesOptions + indices_options?: IndicesOptions } export class DatafeedConfig { @@ -76,7 +76,7 @@ export class DatafeedConfig { /** * Specifies index expansion options that are used during search. */ - indices_options?: DatafeedIndicesOptions + indices_options?: IndicesOptions job_id?: Id /** * If a real-time datafeed has never seen any data (including during any initial training period) then it will automatically stop itself and close its associated job after this many real-time searches that return no documents. In other words, it will stop after `frequency` times `max_empty_searches` of real-time operation. If not set then a datafeed with no end time that sees no data will remain started until it is explicitly stopped. @@ -118,6 +118,7 @@ export class DelayedDataCheckConfig { enabled: boolean } +// Identical to WatcherState, but kept separate as they're different enums in ES export enum DatafeedState { started = 0, stopped = 1, @@ -161,28 +162,3 @@ export class ChunkingConfig { * @server_default 3h */ time_span?: Time } - -export class DatafeedIndicesOptions { - /** - * If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only - * missing or closed indices. This behavior applies even if the request targets other open indices. For example, - * a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. - */ - allow_no_indices?: boolean - /** - * Type of index that wildcard patterns can match. If the request can target data streams, this argument - * determines whether wildcard expressions match hidden data streams. Supports comma-separated values, - * such as `open,hidden`. - */ - expand_wildcards?: ExpandWildcards - /** - * If true, missing or closed indices are not included in the response. - * @server_default false - */ - ignore_unavailable?: boolean - /** - * If true, concrete, expanded or aliased indices are ignored when frozen. - * @server_default true - */ - ignore_throttled?: boolean -} diff --git a/specification/ml/put_datafeed/MlPutDatafeedRequest.ts b/specification/ml/put_datafeed/MlPutDatafeedRequest.ts index a5e3260ef3..292d64af10 100644 --- a/specification/ml/put_datafeed/MlPutDatafeedRequest.ts +++ b/specification/ml/put_datafeed/MlPutDatafeedRequest.ts @@ -17,15 +17,11 @@ * under the License. */ -import { - ChunkingConfig, - DatafeedIndicesOptions, - DelayedDataCheckConfig -} from '@ml/_types/Datafeed' +import { ChunkingConfig, DelayedDataCheckConfig } from '@ml/_types/Datafeed' import { Dictionary } from '@spec_utils/Dictionary' import { AggregationContainer } from '@_types/aggregations/AggregationContainer' import { RequestBase } from '@_types/Base' -import { ExpandWildcards, Id, Indices } from '@_types/common' +import { ExpandWildcards, Id, Indices, IndicesOptions } from '@_types/common' import { RuntimeFields } from '@_types/mapping/RuntimeFields' import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' @@ -120,7 +116,7 @@ export interface Request extends RequestBase { /** * Specifies index expansion options that are used during search */ - indices_options?: DatafeedIndicesOptions + indices_options?: IndicesOptions /** * Identifier for the anomaly detection job. */ diff --git a/specification/ml/put_datafeed/MlPutDatafeedResponse.ts b/specification/ml/put_datafeed/MlPutDatafeedResponse.ts index 57638a3cea..2f1108315b 100644 --- a/specification/ml/put_datafeed/MlPutDatafeedResponse.ts +++ b/specification/ml/put_datafeed/MlPutDatafeedResponse.ts @@ -17,14 +17,10 @@ * under the License. */ -import { - ChunkingConfig, - DatafeedIndicesOptions, - DelayedDataCheckConfig -} from '@ml/_types/Datafeed' +import { ChunkingConfig, DelayedDataCheckConfig } from '@ml/_types/Datafeed' import { Dictionary } from '@spec_utils/Dictionary' import { AggregationContainer } from '@_types/aggregations/AggregationContainer' -import { Id, Indices } from '@_types/common' +import { Id, Indices, IndicesOptions } from '@_types/common' import { RuntimeFields } from '@_types/mapping/RuntimeFields' import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' @@ -40,7 +36,7 @@ export class Response { frequency: Time indices: string[] job_id: Id - indices_options?: DatafeedIndicesOptions + indices_options?: IndicesOptions max_empty_searches: integer query: QueryContainer query_delay: Time diff --git a/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts b/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts index 4c5eed27d2..6adce1da69 100644 --- a/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts +++ b/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts @@ -18,14 +18,10 @@ */ import { RequestBase } from '@_types/Base' -import { ExpandWildcards, Id } from '@_types/common' +import { ExpandWildcards, Id, IndicesOptions } from '@_types/common' import { Dictionary } from '@spec_utils/Dictionary' import { AggregationContainer } from '@_types/aggregations/AggregationContainer' -import { - ChunkingConfig, - DatafeedIndicesOptions, - DelayedDataCheckConfig -} from '@ml/_types/Datafeed' +import { ChunkingConfig, DelayedDataCheckConfig } from '@ml/_types/Datafeed' import { Time } from '@_types/Time' import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' @@ -120,7 +116,7 @@ export interface Request extends RequestBase { /** * Specifies index expansion options that are used during search. */ - indices_options?: DatafeedIndicesOptions + indices_options?: IndicesOptions /** * If a real-time datafeed has never seen any data (including during any initial training period), it automatically * stops and closes the associated job after this many real-time searches return no documents. In other words, diff --git a/specification/ml/update_datafeed/MlUpdateDatafeedResponse.ts b/specification/ml/update_datafeed/MlUpdateDatafeedResponse.ts index 57638a3cea..3efcbf0be7 100644 --- a/specification/ml/update_datafeed/MlUpdateDatafeedResponse.ts +++ b/specification/ml/update_datafeed/MlUpdateDatafeedResponse.ts @@ -17,14 +17,10 @@ * under the License. */ -import { - ChunkingConfig, - DatafeedIndicesOptions, - DelayedDataCheckConfig -} from '@ml/_types/Datafeed' +import { ChunkingConfig, DelayedDataCheckConfig } from '@ml/_types/Datafeed' import { Dictionary } from '@spec_utils/Dictionary' import { AggregationContainer } from '@_types/aggregations/AggregationContainer' -import { Id, Indices } from '@_types/common' +import { Id, IndicesOptions } from '@_types/common' import { RuntimeFields } from '@_types/mapping/RuntimeFields' import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' @@ -40,7 +36,7 @@ export class Response { frequency: Time indices: string[] job_id: Id - indices_options?: DatafeedIndicesOptions + indices_options?: IndicesOptions max_empty_searches: integer query: QueryContainer query_delay: Time diff --git a/specification/sql/translate/TranslateSqlResponse.ts b/specification/sql/translate/TranslateSqlResponse.ts index 1f48184a6b..7aa353c29a 100644 --- a/specification/sql/translate/TranslateSqlResponse.ts +++ b/specification/sql/translate/TranslateSqlResponse.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Sort } from '@global/search/_types/sort' +import { Sort } from '@_types/sort' import { SourceConfig } from '@global/search/_types/SourceFilter' import { Dictionary } from '@spec_utils/Dictionary' import { Field, Fields } from '@_types/common' diff --git a/specification/watcher/_types/Input.ts b/specification/watcher/_types/Input.ts index e48199882a..e4354a3d1d 100644 --- a/specification/watcher/_types/Input.ts +++ b/specification/watcher/_types/Input.ts @@ -23,6 +23,7 @@ import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { ExpandWildcards, IndexName, + IndicesOptions, Password, SearchType, Username @@ -86,13 +87,6 @@ export class HttpInputRequestDefinition { url?: string } -export class IndicesOptions { - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - ignore_unavailable?: boolean - ignore_throttled?: boolean -} - export class Input {} /** diff --git a/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts b/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts index 549282f02d..41eca74426 100644 --- a/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts +++ b/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Sort, SortResults } from '@global/search/_types/sort' +import { Sort, SortResults } from '@_types/sort' import { RequestBase } from '@_types/Base' import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' diff --git a/specification/watcher/stats/types.ts b/specification/watcher/stats/types.ts index bd4367030b..12c26cda07 100644 --- a/specification/watcher/stats/types.ts +++ b/specification/watcher/stats/types.ts @@ -22,6 +22,7 @@ import { Id } from '@_types/common' import { long } from '@_types/Numeric' import { DateString } from '@_types/Time' +// Identical to DatafeedState, but kept separate as they're different enums in ES export enum WatcherState { stopped = 0, starting = 1,