diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 28dbc59793..344955ce3c 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -61531,17 +61531,10 @@ }, "functions": { "description": "One or more functions that compute a new score for each document returned by the query.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreContainer" - } - } - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreContainer" + } }, "max_boost": { "description": "Restricts the new score to not exceed the provided limit.", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index a14a33e7a8..68d188a72e 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -37763,17 +37763,10 @@ }, "functions": { "description": "One or more functions that compute a new score for each document returned by the query.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreContainer" - } - } - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreContainer" + } }, "max_boost": { "description": "Restricts the new score to not exceed the provided limit.", diff --git a/output/schema/schema.json b/output/schema/schema.json index 227f3080ec..10d5e4bda2 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -91385,26 +91385,14 @@ "name": "functions", "required": false, "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "FunctionScoreContainer", - "namespace": "_types.query_dsl" - } - }, - { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "FunctionScoreContainer", - "namespace": "_types.query_dsl" - } - } + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FunctionScoreContainer", + "namespace": "_types.query_dsl" } - ] + } } }, { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 6e22d8edac..2bf1edf279 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -6412,7 +6412,7 @@ export type QueryDslFunctionScoreMode = 'multiply' | 'sum' | 'avg' | 'first' | ' export interface QueryDslFunctionScoreQuery extends QueryDslQueryBase { boost_mode?: QueryDslFunctionBoostMode - functions?: QueryDslFunctionScoreContainer | QueryDslFunctionScoreContainer[] + functions?: QueryDslFunctionScoreContainer[] max_boost?: double min_score?: double query?: QueryDslQueryContainer @@ -6771,7 +6771,7 @@ export interface QueryDslQueryContainer { dis_max?: QueryDslDisMaxQuery distance_feature?: QueryDslDistanceFeatureQuery exists?: QueryDslExistsQuery - function_score?: QueryDslFunctionScoreQuery | QueryDslFunctionScoreContainer | QueryDslFunctionScoreContainer[] + function_score?: QueryDslFunctionScoreQuery | QueryDslFunctionScoreContainer[] fuzzy?: Partial> geo_bounding_box?: QueryDslGeoBoundingBoxQuery geo_distance?: QueryDslGeoDistanceQuery diff --git a/specification/_types/query_dsl/compound.ts b/specification/_types/query_dsl/compound.ts index 1d08ab0a98..434f5918fc 100644 --- a/specification/_types/query_dsl/compound.ts +++ b/specification/_types/query_dsl/compound.ts @@ -115,7 +115,7 @@ export class FunctionScoreQuery extends QueryBase { /** * One or more functions that compute a new score for each document returned by the query. */ - functions?: FunctionScoreContainer | FunctionScoreContainer[] + functions?: FunctionScoreContainer[] /** * Restricts the new score to not exceed the provided limit. */