diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java index fb098786c3d..2b4bc571e33 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java @@ -133,7 +133,7 @@ public abstract class PrefixTreeStrategy extends SpatialStrategy { return new Field[]{field}; } - protected CellTokenStream createTokenStream(Shape shape, int detailLevel) { + protected TokenStream createTokenStream(Shape shape, int detailLevel) { Iterator cells = grid.getTreeCellIterator(shape, detailLevel); return new CellTokenStream().setCells(cells); } diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java index 3091af4f25a..4e464b946f3 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java @@ -19,6 +19,7 @@ package org.apache.lucene.spatial.prefix; import com.spatial4j.core.shape.Point; import com.spatial4j.core.shape.Shape; +import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.search.Filter; import org.apache.lucene.spatial.DisjointSpatialFilter; import org.apache.lucene.spatial.prefix.tree.Cell; @@ -112,7 +113,7 @@ public class RecursivePrefixTreeStrategy extends PrefixTreeStrategy { } @Override - protected CellTokenStream createTokenStream(Shape shape, int detailLevel) { + protected TokenStream createTokenStream(Shape shape, int detailLevel) { if (shape instanceof Point || !pruneLeafyBranches) return super.createTokenStream(shape, detailLevel);