From 2346147429656397456873482af4ce93dd3a62fa Mon Sep 17 00:00:00 2001 From: David Wayne Smiley Date: Tue, 10 Jun 2014 21:28:46 +0000 Subject: [PATCH] LUCENE-5648: Bug fix for detecting Contains relation when on the edge. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1601777 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/spatial/prefix/tree/NumberRangePrefixTree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/NumberRangePrefixTree.java b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/NumberRangePrefixTree.java index 27c1642e1fe..2eebb59dc6b 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/NumberRangePrefixTree.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/tree/NumberRangePrefixTree.java @@ -744,7 +744,7 @@ public abstract class NumberRangePrefixTree extends SpatialPrefixTree { return SpatialRelation.INTERSECTS; } for (;nrMaxLevel < getLevel(); nrMaxLevel++) { - if (getValAtLevel(nrMaxLevel + 1) != getNumSubCells(getLVAtLevel(nrMaxLevel-1)) - 1) + if (getValAtLevel(nrMaxLevel + 1) != getNumSubCells(getLVAtLevel(nrMaxLevel)) - 1) return SpatialRelation.INTERSECTS; } return SpatialRelation.CONTAINS;