mirror of https://github.com/apache/lucene.git
LUCENE-6181: spatial pointsOnly check bug
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1653057 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cb3ec682d4
commit
718141c5fe
|
@ -147,8 +147,8 @@ public abstract class PrefixTreeStrategy extends SpatialStrategy {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TokenStream createTokenStream(Shape shape, int detailLevel) {
|
protected TokenStream createTokenStream(Shape shape, int detailLevel) {
|
||||||
if (pointsOnly && shape instanceof Point) {
|
if (pointsOnly && !(shape instanceof Point)) {
|
||||||
throw new IllegalArgumentException("pointsOnly is true yet a point is given for indexing");
|
throw new IllegalArgumentException("pointsOnly is true yet a " + shape.getClass() + " is given for indexing");
|
||||||
}
|
}
|
||||||
Iterator<Cell> cells = grid.getTreeCellIterator(shape, detailLevel);
|
Iterator<Cell> cells = grid.getTreeCellIterator(shape, detailLevel);
|
||||||
return new CellTokenStream().setCells(cells);
|
return new CellTokenStream().setCells(cells);
|
||||||
|
|
Loading…
Reference in New Issue