Geo point supports only POINT among WKT primitives – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.4-7.15

Briefly, this error occurs when you’re trying to index a document with a geo_point field in Elasticsearch, but the value of the field is not a POINT. Elasticsearch only supports POINT as a valid Well-Known Text (WKT) primitive for geo_point fields. To resolve this issue, ensure that the value of the geo_point field is a POINT. If you’re using a different WKT primitive, convert it to a POINT before indexing the document. Alternatively, consider using a geo_shape field if you need to index other types of geometric shapes.

This guide will help you check for common problems that cause the log ” [geo_point] supports only POINT among WKT primitives; ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: .

Log Context

Log “[geo_point] supports only POINT among WKT primitives;” class name is GeoPoint.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 geometry = WellKnownText.fromWKT(GeographyValidator.instance(ignoreZValue); false; value);
 } catch (Exception e) {
 throw new ElasticsearchParseException("Invalid WKT format"; e);
 }
 if (geometry.type() != ShapeType.POINT) {
 throw new ElasticsearchParseException("[geo_point] supports only POINT among WKT primitives; " +
 "but found " + geometry.type());
 }
 Point point = (Point) geometry;
 return reset(point.getY(); point.getX());
 }

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?