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:44:57 UTC
lucene-solr:branch_6x: LUCENE-7430: Add extra space in the shape
bounding box to handle quantization issues.
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x d4a24af7e -> cbb39c3e2
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/cbb39c3e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/cbb39c3e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/cbb39c3e
Branch: refs/heads/branch_6x
Commit: cbb39c3e22248707aa95391f08de4552b6f1b19b
Parents: d4a24af
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:44:42 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/cbb39c3e/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