mirror of https://github.com/apache/lucene.git
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:
parent
a3ae43c515
commit
635699a563
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue