From 35c68840a4bf8e05f04701114ea6fbeeee57a56c Mon Sep 17 00:00:00 2001 From: Laura Date: Wed, 17 Jan 2024 10:34:09 +0100 Subject: [PATCH] adding ignore_unmapped to GeoDistanceQuery (#2388) (cherry picked from commit d7b42a961806190aedb9692fd3a562ea0ebe1702) --- output/schema/schema.json | 25 +++++++++++++++++++------ output/typescript/types.ts | 3 ++- specification/_types/query_dsl/geo.ts | 6 ++++++ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index e7345c1def..0a9c77bd25 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -61591,9 +61591,22 @@ "namespace": "_types.query_dsl" } } + }, + { + "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "name": "ignore_unmapped", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "_types/query_dsl/geo.ts#L48-L57" + "specLocation": "_types/query_dsl/geo.ts#L57-L85" }, { "kind": "enum", @@ -61633,7 +61646,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L59-L61" + "specLocation": "_types/query_dsl/geo.ts#L87-L89" }, { "attachedBehaviors": [ @@ -61703,7 +61716,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L63-L71" + "specLocation": "_types/query_dsl/geo.ts#L91-L99" }, { "kind": "interface", @@ -61746,7 +61759,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L78-L82" + "specLocation": "_types/query_dsl/geo.ts#L106-L117" }, { "attachedBehaviors": [ @@ -61800,7 +61813,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L86-L91" + "specLocation": "_types/query_dsl/geo.ts#L121-L131" }, { "kind": "enum", @@ -61819,7 +61832,7 @@ "name": "GeoValidationMethod", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/geo.ts#L107-L111" + "specLocation": "_types/query_dsl/geo.ts#L147-L157" }, { "inherits": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 0f51756407..728c757ff1 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -5071,9 +5071,10 @@ export interface QueryDslGeoDistanceQueryKeys extends QueryDslQueryBase { distance?: Distance distance_type?: GeoDistanceType validation_method?: QueryDslGeoValidationMethod + ignore_unmapped?: boolean } export type QueryDslGeoDistanceQuery = QueryDslGeoDistanceQueryKeys - & { [property: string]: GeoLocation | Distance | GeoDistanceType | QueryDslGeoValidationMethod | float | string } + & { [property: string]: GeoLocation | Distance | GeoDistanceType | QueryDslGeoValidationMethod | boolean | float | string } export type QueryDslGeoExecution = 'memory' | 'indexed' diff --git a/specification/_types/query_dsl/geo.ts b/specification/_types/query_dsl/geo.ts index c981e2c085..ff34f815e8 100644 --- a/specification/_types/query_dsl/geo.ts +++ b/specification/_types/query_dsl/geo.ts @@ -54,6 +54,12 @@ export class GeoDistanceQuery distance_type?: GeoDistanceType /** @server_default 'strict' */ validation_method?: GeoValidationMethod + /** + * Set to `true` to ignore an unmapped field and not match any documents for this query. + * Set to `false` to throw an exception if the field is not mapped. + * @server_default false + */ + ignore_unmapped?: boolean } export class GeoPolygonPoints {