Skip to content

Apache Lucene open-source search software

implement grow() for polygon queries too: easy speedup.

Robert Muir0dc32e3d6b1a
diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointInPolygonQuery.java b/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointInPolygonQuery.java
index 23a98d22c77..e68cb4579c6 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointInPolygonQuery.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointInPolygonQuery.java
@@ -120,6 +120,11 @@ final class LatLonPointInPolygonQuery extends Query {
values.intersect(field,
new IntersectVisitor() {
+ @Override
+ public void grow(int count) {
+ result.grow(count);
+ }
+
@Override
public void visit(int docID) {
result.add(docID);