Skip to content

Commit

Permalink
doh! need to move the Geometry reader to matches too
Browse files Browse the repository at this point in the history
  • Loading branch information
iverase committed Oct 11, 2023
1 parent 7c29dd2 commit 139e69c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public class GeoShapeScriptFieldGeoShapeQuery extends AbstractGeoShapeScriptFiel
private final LatLonGeometry[] geometries;
private final ShapeRelation relation;
private final GeoShapeIndexer indexer;
private final GeometryDocValueReader reader = new GeometryDocValueReader();

public GeoShapeScriptFieldGeoShapeQuery(
Script script,
Expand All @@ -54,6 +53,7 @@ protected boolean matches(Geometry geometry) {
if (geometry == null) {
return false;
}
final GeometryDocValueReader reader = new GeometryDocValueReader();
final Component2DVisitor visitor = Component2DVisitor.getVisitor(component2D, relation.getLuceneRelation(), CoordinateEncoder.GEO);
try {
reader.reset(encodeGeometry(geometry));
Expand Down

0 comments on commit 139e69c

Please sign in to comment.