Skip to content

Add GeoPoint shape type for geo_shape query#6413

Open
m15flores wants to merge 3 commits into
elastic:mainfrom
m15flores:add-geopoint-shape
Open

Add GeoPoint shape type for geo_shape query#6413
m15flores wants to merge 3 commits into
elastic:mainfrom
m15flores:add-geopoint-shape

Conversation

@m15flores

Copy link
Copy Markdown
Contributor

Closes elastic/elasticsearch-java#501

Adds a GeoPoint type in _types/Geo.ts, following the same shape as the existing GeoLine, and references it from GeoShapeFieldQuery.shape as GeoShape | GeoPoint.

Tried adding GeoPoint standalone first (like GeoLine), but it gets dropped as a dangling type since nothing points to it (GeoLine only survives through the aggregation reference). Referencing GeoPoint from shape fixes that without changing GeoShape itself, so this isn't a breaking change: raw JSON shapes still work exactly as before, GeoPoint is just an additional typed option.

Tested against a live 8.15.0 cluster: querying a geo_shape field with {"type": "point", "coordinates": [...]} as the shape returns the expected results.

@l-trotta

l-trotta commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Thanks @m15flores! Couple things: while this is not breaking for the java client, it could be for other clients that don't override to JsonData, so I'll have to check before merging; also, could you add a comment about this being a hackfix?

@m15flores

m15flores commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Hey! Added the hackfix comment. Let me know if there's anything I can help verify for the other clients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Builtin GeoPoint shape

2 participants