diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index e8c7cb9185..3e3df1965e 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -45995,6 +45995,15 @@ "geo_distance": { "$ref": "#/components/schemas/_types.query_dsl:GeoDistanceQuery" }, + "geo_grid": { + "description": "Matches `geo_point` and `geo_shape` values that intersect a grid cell from a GeoGrid aggregation.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl:GeoGridQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, "geo_polygon": { "$ref": "#/components/schemas/_types.query_dsl:GeoPolygonQuery" }, @@ -47110,6 +47119,29 @@ "plane" ] }, + "_types.query_dsl:GeoGridQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "geogrid": { + "$ref": "#/components/schemas/_types:GeoTile" + }, + "geohash": { + "$ref": "#/components/schemas/_types:GeoHash" + }, + "geohex": { + "$ref": "#/components/schemas/_types:GeoHexCell" + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, "_types.query_dsl:GeoPolygonQuery": { "allOf": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 45680044af..dcf481573a 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -26131,6 +26131,15 @@ "geo_distance": { "$ref": "#/components/schemas/_types.query_dsl:GeoDistanceQuery" }, + "geo_grid": { + "description": "Matches `geo_point` and `geo_shape` values that intersect a grid cell from a GeoGrid aggregation.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.query_dsl:GeoGridQuery" + }, + "minProperties": 1, + "maxProperties": 1 + }, "geo_polygon": { "$ref": "#/components/schemas/_types.query_dsl:GeoPolygonQuery" }, @@ -27246,6 +27255,29 @@ "plane" ] }, + "_types.query_dsl:GeoGridQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "geogrid": { + "$ref": "#/components/schemas/_types:GeoTile" + }, + "geohash": { + "$ref": "#/components/schemas/_types:GeoHash" + }, + "geohex": { + "$ref": "#/components/schemas/_types:GeoHexCell" + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, "_types.query_dsl:GeoPolygonQuery": { "allOf": [ { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 4be5ba4003..fb2c83b835 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -49128,6 +49128,29 @@ } } }, + { + "description": "Matches `geo_point` and `geo_shape` values that intersect a grid cell from a GeoGrid aggregation.", + "name": "geo_grid", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + "kind": "dictionary_of", + "singleKey": true, + "value": { + "kind": "instance_of", + "type": { + "name": "GeoGridQuery", + "namespace": "_types.query_dsl" + } + } + } + }, { "deprecation": { "description": "Use geo-shape instead.", @@ -49984,7 +50007,7 @@ } } ], - "specLocation": "_types/query_dsl/abstractions.ts#L102-L428", + "specLocation": "_types/query_dsl/abstractions.ts#L103-L434", "variants": { "kind": "container", "nonExhaustive": true @@ -50163,7 +50186,7 @@ } } ], - "specLocation": "_types/query_dsl/abstractions.ts#L453-L464" + "specLocation": "_types/query_dsl/abstractions.ts#L459-L470" }, { "kind": "type_alias", @@ -50509,7 +50532,7 @@ } } ], - "specLocation": "_types/query_dsl/abstractions.ts#L466-L500" + "specLocation": "_types/query_dsl/abstractions.ts#L472-L506" }, { "kind": "enum", @@ -50525,7 +50548,7 @@ "name": "CombinedFieldsOperator", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/abstractions.ts#L513-L516" + "specLocation": "_types/query_dsl/abstractions.ts#L519-L522" }, { "kind": "enum", @@ -50543,7 +50566,7 @@ "name": "CombinedFieldsZeroTerms", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/abstractions.ts#L518-L527" + "specLocation": "_types/query_dsl/abstractions.ts#L524-L533" }, { "extDocId": "query-dsl-constant-score-query", @@ -52041,7 +52064,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L32-L54" + "specLocation": "_types/query_dsl/geo.ts#L35-L57" }, { "codegenNames": [ @@ -52365,7 +52388,7 @@ "name": "GeoExecution", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/geo.ts#L56-L59" + "specLocation": "_types/query_dsl/geo.ts#L59-L62" }, { "kind": "enum", @@ -52386,7 +52409,7 @@ "name": "GeoValidationMethod", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/geo.ts#L163-L173" + "specLocation": "_types/query_dsl/geo.ts#L173-L183" }, { "attachedBehaviors": [ @@ -52488,7 +52511,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L61-L93" + "specLocation": "_types/query_dsl/geo.ts#L64-L96" }, { "kind": "type_alias", @@ -52523,6 +52546,90 @@ }, "specLocation": "_types/Geo.ts#L42-L51" }, + { + "inherits": { + "type": { + "name": "QueryBase", + "namespace": "_types.query_dsl" + } + }, + "kind": "interface", + "name": { + "name": "GeoGridQuery", + "namespace": "_types.query_dsl" + }, + "properties": [ + { + "name": "geogrid", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "GeoTile", + "namespace": "_types" + } + } + }, + { + "name": "geohash", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "GeoHash", + "namespace": "_types" + } + } + }, + { + "name": "geohex", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "GeoHexCell", + "namespace": "_types" + } + } + } + ], + "specLocation": "_types/query_dsl/geo.ts#L98-L103", + "variants": { + "kind": "container" + } + }, + { + "description": "A map tile reference, represented as `{zoom}/{x}/{y}`", + "kind": "type_alias", + "name": { + "name": "GeoTile", + "namespace": "_types" + }, + "specLocation": "_types/Geo.ts#L93-L94", + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "A map hex cell (H3) reference", + "kind": "type_alias", + "name": { + "name": "GeoHexCell", + "namespace": "_types" + }, + "specLocation": "_types/Geo.ts#L96-L97", + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "attachedBehaviors": [ "AdditionalProperty" @@ -52597,7 +52704,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L99-L111" + "specLocation": "_types/query_dsl/geo.ts#L109-L121" }, { "kind": "interface", @@ -52621,7 +52728,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L95-L97" + "specLocation": "_types/query_dsl/geo.ts#L105-L107" }, { "attachedBehaviors": [ @@ -52683,7 +52790,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L131-L147" + "specLocation": "_types/query_dsl/geo.ts#L141-L157" }, { "kind": "interface", @@ -52729,7 +52836,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L118-L129" + "specLocation": "_types/query_dsl/geo.ts#L128-L139" }, { "description": "A GeoJson shape, that can also use Elasticsearch's `envelope` extension.", @@ -52799,7 +52906,7 @@ } } ], - "specLocation": "_types/query_dsl/abstractions.ts#L430-L447" + "specLocation": "_types/query_dsl/abstractions.ts#L436-L453" }, { "kind": "enum", @@ -53274,7 +53381,7 @@ } ], "shortcutProperty": "field", - "specLocation": "_types/query_dsl/abstractions.ts#L529-L543" + "specLocation": "_types/query_dsl/abstractions.ts#L535-L549" }, { "inherits": { @@ -60367,7 +60474,7 @@ } } ], - "specLocation": "_types/query_dsl/abstractions.ts#L502-L511" + "specLocation": "_types/query_dsl/abstractions.ts#L508-L517" }, { "inherits": { @@ -78436,38 +78543,6 @@ } } }, - { - "description": "A map hex cell (H3) reference", - "kind": "type_alias", - "name": { - "name": "GeoHexCell", - "namespace": "_types" - }, - "specLocation": "_types/Geo.ts#L96-L97", - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "description": "A map tile reference, represented as `{zoom}/{x}/{y}`", - "kind": "type_alias", - "name": { - "name": "GeoTile", - "namespace": "_types" - }, - "specLocation": "_types/Geo.ts#L93-L94", - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, { "kind": "type_alias", "name": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 1f01a5bbca..f230648118 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -81181,7 +81181,7 @@ "name": "CombinedFieldsOperator", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/abstractions.ts#L513-L516" + "specLocation": "_types/query_dsl/abstractions.ts#L519-L522" }, { "kind": "interface", @@ -81277,7 +81277,7 @@ } } ], - "specLocation": "_types/query_dsl/abstractions.ts#L466-L500" + "specLocation": "_types/query_dsl/abstractions.ts#L472-L506" }, { "kind": "enum", @@ -81295,7 +81295,7 @@ "name": "CombinedFieldsZeroTerms", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/abstractions.ts#L518-L527" + "specLocation": "_types/query_dsl/abstractions.ts#L524-L533" }, { "kind": "interface", @@ -81959,7 +81959,7 @@ } ], "shortcutProperty": "field", - "specLocation": "_types/query_dsl/abstractions.ts#L529-L543" + "specLocation": "_types/query_dsl/abstractions.ts#L535-L549" }, { "kind": "interface", @@ -82017,7 +82017,7 @@ } } ], - "specLocation": "_types/query_dsl/abstractions.ts#L430-L447" + "specLocation": "_types/query_dsl/abstractions.ts#L436-L453" }, { "kind": "enum", @@ -82608,7 +82608,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L32-L54" + "specLocation": "_types/query_dsl/geo.ts#L35-L57" }, { "kind": "interface", @@ -82775,7 +82775,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L61-L93" + "specLocation": "_types/query_dsl/geo.ts#L64-L96" }, { "kind": "enum", @@ -82791,7 +82791,59 @@ "name": "GeoExecution", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/geo.ts#L56-L59" + "specLocation": "_types/query_dsl/geo.ts#L59-L62" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "QueryBase", + "namespace": "_types.query_dsl" + } + }, + "name": { + "name": "GeoGridQuery", + "namespace": "_types.query_dsl" + }, + "properties": [ + { + "name": "geogrid", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "GeoTile", + "namespace": "_types" + } + } + }, + { + "name": "geohash", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "GeoHash", + "namespace": "_types" + } + } + }, + { + "name": "geohex", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "GeoHexCell", + "namespace": "_types" + } + } + } + ], + "specLocation": "_types/query_dsl/geo.ts#L98-L103", + "variants": { + "kind": "container" + } }, { "kind": "interface", @@ -82815,7 +82867,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L95-L97" + "specLocation": "_types/query_dsl/geo.ts#L105-L107" }, { "kind": "interface", @@ -82891,7 +82943,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L99-L111" + "specLocation": "_types/query_dsl/geo.ts#L109-L121" }, { "kind": "interface", @@ -82937,7 +82989,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L118-L129" + "specLocation": "_types/query_dsl/geo.ts#L128-L139" }, { "kind": "interface", @@ -82999,7 +83051,7 @@ } } ], - "specLocation": "_types/query_dsl/geo.ts#L131-L147" + "specLocation": "_types/query_dsl/geo.ts#L141-L157" }, { "kind": "enum", @@ -83020,7 +83072,7 @@ "name": "GeoValidationMethod", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/geo.ts#L163-L173" + "specLocation": "_types/query_dsl/geo.ts#L173-L183" }, { "kind": "interface", @@ -85674,7 +85726,7 @@ } } ], - "specLocation": "_types/query_dsl/abstractions.ts#L453-L464" + "specLocation": "_types/query_dsl/abstractions.ts#L459-L470" }, { "kind": "interface", @@ -85883,6 +85935,29 @@ } } }, + { + "description": "Matches `geo_point` and `geo_shape` values that intersect a grid cell from a GeoGrid aggregation.", + "name": "geo_grid", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + "singleKey": true, + "value": { + "kind": "instance_of", + "type": { + "name": "GeoGridQuery", + "namespace": "_types.query_dsl" + } + } + } + }, { "deprecation": { "description": "Use geo-shape instead.", @@ -86739,7 +86814,7 @@ } } ], - "specLocation": "_types/query_dsl/abstractions.ts#L102-L428", + "specLocation": "_types/query_dsl/abstractions.ts#L103-L434", "variants": { "kind": "container", "nonExhaustive": true @@ -89621,7 +89696,7 @@ } } ], - "specLocation": "_types/query_dsl/abstractions.ts#L502-L511" + "specLocation": "_types/query_dsl/abstractions.ts#L508-L517" }, { "kind": "enum", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 911de2f5b3..2d37433fcc 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -6090,6 +6090,12 @@ export type QueryDslGeoDistanceQuery = QueryDslGeoDistanceQueryKeys export type QueryDslGeoExecution = 'memory' | 'indexed' +export interface QueryDslGeoGridQuery extends QueryDslQueryBase { + geogrid?: GeoTile + geohash?: GeoHash + geohex?: GeoHexCell +} + export interface QueryDslGeoPolygonPoints { points: GeoLocation[] } @@ -6385,6 +6391,7 @@ export interface QueryDslQueryContainer { fuzzy?: Partial> geo_bounding_box?: QueryDslGeoBoundingBoxQuery geo_distance?: QueryDslGeoDistanceQuery + geo_grid?: Partial> geo_polygon?: QueryDslGeoPolygonQuery geo_shape?: QueryDslGeoShapeQuery has_child?: QueryDslHasChildQuery diff --git a/specification/_types/query_dsl/abstractions.ts b/specification/_types/query_dsl/abstractions.ts index 9c7c3767dc..1a560f79a2 100644 --- a/specification/_types/query_dsl/abstractions.ts +++ b/specification/_types/query_dsl/abstractions.ts @@ -48,6 +48,7 @@ import { import { GeoBoundingBoxQuery, GeoDistanceQuery, + GeoGridQuery, GeoPolygonQuery, GeoShapeQuery } from './geo' @@ -167,6 +168,11 @@ export class QueryContainer { * @ext_doc_id query-dsl-geo-distance-query */ geo_distance?: GeoDistanceQuery + + /** + * Matches `geo_point` and `geo_shape` values that intersect a grid cell from a GeoGrid aggregation. + */ + geo_grid?: SingleKeyDictionary /** * @deprecated 7.12.0 Use geo-shape instead. */ diff --git a/specification/_types/query_dsl/geo.ts b/specification/_types/query_dsl/geo.ts index e78d9d5fdf..d73e6327e3 100644 --- a/specification/_types/query_dsl/geo.ts +++ b/specification/_types/query_dsl/geo.ts @@ -23,9 +23,12 @@ import { Distance, GeoBounds, GeoDistanceType, + GeoHash, + GeoHexCell, GeoLocation, GeoShape, - GeoShapeRelation + GeoShapeRelation, + GeoTile } from '@_types/Geo' import { FieldLookup, QueryBase } from './abstractions' @@ -92,6 +95,13 @@ export class GeoDistanceQuery ignore_unmapped?: boolean } +/** @variants container */ +export class GeoGridQuery extends QueryBase { + geogrid?: GeoTile + geohash?: GeoHash + geohex?: GeoHexCell +} + export class GeoPolygonPoints { points: GeoLocation[] }