You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by kw...@apache.org on 2016/10/02 19:43:31 UTC
lucene-solr:master: LUCENE-7430: Add extra space in the shape
bounding box to handle quantization issues.
Repository: lucene-solr
Updated Branches:
refs/heads/master 3182cd987 -> 31d07eda1
LUCENE-7430: Add extra space in the shape bounding box to handle quantization issues.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/31d07eda
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/31d07eda
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/31d07eda
Branch: refs/heads/master
Commit: 31d07eda18eb48be4153b9ee4d946719e7e333ac
Parents: 3182cd9
Author: Karl Wright <Da...@gmail.com>
Authored: Sun Oct 2 15:43:23 2016 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Sun Oct 2 15:43:23 2016 -0400
----------------------------------------------------------------------
.../apache/lucene/spatial3d/Geo3DDocValuesField.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/31d07eda/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/Geo3DDocValuesField.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/Geo3DDocValuesField.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/Geo3DDocValuesField.java
index ef33fd5..551fa5a 100644
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/Geo3DDocValuesField.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/Geo3DDocValuesField.java
@@ -67,11 +67,17 @@ public class Geo3DDocValuesField extends Field {
private final static double yFactor = 1.0 / inverseYFactor;
private final static double zFactor = 1.0 / inverseZFactor;
+ // Fudge factor for step adjustments. This is here solely to handle inaccuracies in bounding boxes
+ // that occur because of quantization. For unknown reasons, the fudge factor needs to be
+ // 10.0 rather than 1.0. See LUCENE-7430.
+
+ private final static double STEP_FUDGE = 10.0;
+
// These values are the delta between a value and the next value in each specific dimension
- private final static double xStep = inverseXFactor;
- private final static double yStep = inverseYFactor;
- private final static double zStep = inverseZFactor;
+ private final static double xStep = inverseXFactor * STEP_FUDGE;
+ private final static double yStep = inverseYFactor * STEP_FUDGE;
+ private final static double zStep = inverseZFactor * STEP_FUDGE;
/**
* Type for a Geo3DDocValuesField