diff --git a/output/schema/schema.json b/output/schema/schema.json index 1049d2fcd1..a3a0dd428b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -24024,7 +24024,7 @@ "namespace": "_global.search" }, "specLocation": { - "endLine": 49, + "endLine": 50, "path": "_global/search/SearchResponse.ts", "startLine": 30 } @@ -29653,12 +29653,12 @@ "kind": "properties", "properties": [ { - "name": "_shards", + "name": "took", "required": true, "type": { "kind": "instance_of", "type": { - "name": "ShardStatistics", + "name": "long", "namespace": "_types" } } @@ -29675,12 +29675,12 @@ } }, { - "name": "took", + "name": "_shards", "required": true, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "ShardStatistics", "namespace": "_types" } } @@ -29704,6 +29704,157 @@ "namespace": "_global.search._types" } } + }, + { + "name": "aggregations", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "AggregateName", + "namespace": "_types" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "Aggregate", + "namespace": "_types.aggregations" + } + } + } + }, + { + "name": "_clusters", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ClusterStatistics", + "namespace": "_types" + } + } + }, + { + "name": "fields", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "internal" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "user_defined_value" + } + } + }, + { + "name": "max_score", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + }, + { + "name": "num_reduce_phases", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "profile", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Profile", + "namespace": "_global.search._types" + } + } + }, + { + "name": "pit_id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "_scroll_id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ScrollId", + "namespace": "_types" + } + } + }, + { + "name": "suggest", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "SuggestionName", + "namespace": "_types" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "array_of", + "value": { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "TDocument", + "namespace": "_global.search_template" + } + } + ], + "kind": "instance_of", + "type": { + "name": "Suggest", + "namespace": "_global.search._types" + } + } + } + } + }, + { + "name": "terminated_early", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "internal" + } + } } ] }, @@ -29719,9 +29870,9 @@ "namespace": "_global.search_template" }, "specLocation": { - "endLine": 31, + "endLine": 48, "path": "_global/search_template/SearchTemplateResponse.ts", - "startLine": 24 + "startLine": 30 } }, { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 340f039b6d..0dadda7265 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -1592,10 +1592,20 @@ export interface SearchTemplateRequest extends RequestBase { } export interface SearchTemplateResponse { - _shards: ShardStatistics + took: long timed_out: boolean - took: integer + _shards: ShardStatistics hits: SearchHitsMetadata + aggregations?: Record + _clusters?: ClusterStatistics + fields?: Record + max_score?: double + num_reduce_phases?: long + profile?: SearchProfile + pit_id?: Id + _scroll_id?: ScrollId + suggest?: Record[]> + terminated_early?: boolean } export interface TermsEnumRequest extends RequestBase { diff --git a/specification/_global/search/SearchResponse.ts b/specification/_global/search/SearchResponse.ts index 0cc62f2a3f..7d60752e78 100644 --- a/specification/_global/search/SearchResponse.ts +++ b/specification/_global/search/SearchResponse.ts @@ -29,6 +29,7 @@ import { Suggest } from './_types/suggester' export class Response { body: { + // Has to be kept in sync with SearchTemplateResponse took: long timed_out: boolean _shards: ShardStatistics diff --git a/specification/_global/search_template/SearchTemplateResponse.ts b/specification/_global/search_template/SearchTemplateResponse.ts index 8c72b6c61a..2bceac23d8 100644 --- a/specification/_global/search_template/SearchTemplateResponse.ts +++ b/specification/_global/search_template/SearchTemplateResponse.ts @@ -18,14 +18,31 @@ */ import { HitsMetadata } from '@global/search/_types/hits' -import { integer } from '@_types/Numeric' -import { ShardStatistics } from '@_types/Stats' +import { double, integer, long } from '@_types/Numeric' +import { ClusterStatistics, ShardStatistics } from '@_types/Stats' +import { Dictionary } from '@spec_utils/Dictionary' +import { AggregateName, Id, ScrollId, SuggestionName } from '@_types/common' +import { Aggregate } from '@_types/aggregations/Aggregate' +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' +import { Profile } from '@global/search/_types/profile' +import { Suggest } from '@global/search/_types/suggester' export class Response { body: { - _shards: ShardStatistics + // Has to be kept in sync with SearchResponse + took: long timed_out: boolean - took: integer + _shards: ShardStatistics hits: HitsMetadata + aggregations?: Dictionary + _clusters?: ClusterStatistics + fields?: Dictionary + max_score?: double + num_reduce_phases?: long + profile?: Profile + pit_id?: Id + _scroll_id?: ScrollId + suggest?: Dictionary[]> + terminated_early?: boolean } }