From c800ede21d6cb025b388ca6f2ca40fd595d85ddc Mon Sep 17 00:00:00 2001 From: Laura Date: Mon, 15 Jan 2024 14:47:09 +0100 Subject: [PATCH] adding ignore_unmapped to GeoDistanceQuery --- .../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 7527080687..d00051061f 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -33051,6 +33051,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 6dd4e1a9f0..0e8ec1412f 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 1127f14477..065c6f2008 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 {