LUCENE-4342 errant +1 in spatial prefix tree factory getLevelForDistance()

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1380739 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David Wayne Smiley 2012-09-04 16:59:27 +00:00
parent a3ae43c515
commit 635699a563
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ public class GeohashPrefixTree extends SpatialPrefixTree {
@Override
protected int getLevelForDistance(double degrees) {
GeohashPrefixTree grid = new GeohashPrefixTree(ctx, GeohashPrefixTree.getMaxLevelsPossible());
return grid.getLevelForDistance(degrees) + 1;//returns 1 greater
return grid.getLevelForDistance(degrees);
}
@Override

View File

@ -41,7 +41,7 @@ public class QuadPrefixTree extends SpatialPrefixTree {
@Override
protected int getLevelForDistance(double degrees) {
QuadPrefixTree grid = new QuadPrefixTree(ctx, MAX_LEVELS_POSSIBLE);
return grid.getLevelForDistance(degrees) + 1;//returns 1 greater
return grid.getLevelForDistance(degrees);
}
@Override