From 292edec55e59900f7bd54c2c3c4cbd8293b8363f Mon Sep 17 00:00:00 2001 From: Josh Mock Date: Thu, 18 Apr 2024 13:06:45 -0500 Subject: [PATCH] Add missing fields property on top_hits aggregation --- specification/_types/aggregations/metric.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/specification/_types/aggregations/metric.ts b/specification/_types/aggregations/metric.ts index b40f7539a1..c5767b60fb 100644 --- a/specification/_types/aggregations/metric.ts +++ b/specification/_types/aggregations/metric.ts @@ -24,7 +24,7 @@ import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { Field, Fields } from '@_types/common' import { double, integer, long } from '@_types/Numeric' -import { QueryContainer } from '@_types/query_dsl/abstractions' +import { FieldAndFormat, QueryContainer } from '@_types/query_dsl/abstractions' import { Script, ScriptField } from '@_types/Scripting' import { Aggregation } from './Aggregation' import { Missing } from './AggregationContainer' @@ -344,6 +344,11 @@ export class TopHitsAggregation extends MetricAggregationBase { * @server_default false */ explain?: boolean + /** + * Array of wildcard (*) patterns. The request returns values for field names + * matching these patterns in the hits.fields property of the response. + */ + fields?: (FieldAndFormat | Field)[] /** * Starting document offset. * @server_default 0