From ac9b206071c2e94f41e65533c76f889a4d0a9f1a Mon Sep 17 00:00:00 2001 From: Laura Trotta <153528055+l-trotta@users.noreply.github.com> Date: Mon, 15 Jan 2024 14:54:38 +0100 Subject: [PATCH] adding ignore_unmapped to GeoDistanceQuery (#2388) (cherry picked from commit d7b42a961806190aedb9692fd3a562ea0ebe1702) --- .../elasticsearch-serverless-openapi.json | 4 +++ output/schema/schema.json | 25 ++++++++++++++----- output/typescript/types.ts | 3 ++- specification/_types/query_dsl/geo.ts | 6 +++++ 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index f8739a2e50..8542b2d8d8 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -33042,6 +33042,10 @@ }, "validation_method": { "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" + }, + "ignore_unmapped": { + "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.", + "type": "boolean" } }, "required": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index 0971214be1..d2dc7b606d 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -73646,9 +73646,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#L57-L79" + "specLocation": "_types/query_dsl/geo.ts#L57-L85" }, { "kind": "enum", @@ -73688,7 +73701,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L81-L83" + "specLocation": "_types/query_dsl/geo.ts#L87-L89" }, { "attachedBehaviors": [ @@ -73758,7 +73771,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L85-L93" + "specLocation": "_types/query_dsl/geo.ts#L91-L99" }, { "kind": "interface", @@ -73804,7 +73817,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L100-L111" + "specLocation": "_types/query_dsl/geo.ts#L106-L117" }, { "attachedBehaviors": [ @@ -73860,7 +73873,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L115-L125" + "specLocation": "_types/query_dsl/geo.ts#L121-L131" }, { "kind": "enum", @@ -73881,7 +73894,7 @@ "name": "GeoValidationMethod", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/geo.ts#L141-L151" + "specLocation": "_types/query_dsl/geo.ts#L147-L157" }, { "inherits": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 8b62d2d94c..c7e406a231 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -5508,9 +5508,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 6cc868e734..fc230874ea 100644 --- a/specification/_types/query_dsl/geo.ts +++ b/specification/_types/query_dsl/geo.ts @@ -76,6 +76,12 @@ export class GeoDistanceQuery * @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 {