You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2015/08/19 22:27:55 UTC

svn commit: r1696665 - /lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/bkdtree3d/PointInGeo3DShapeQuery.java

Author: mikemccand
Date: Wed Aug 19 20:27:54 2015
New Revision: 1696665

URL: http://svn.apache.org/r1696665
Log:
LUCENE-6699: comment out assert (nocommit) remove fudge factors

Modified:
    lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/bkdtree3d/PointInGeo3DShapeQuery.java

Modified: lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/bkdtree3d/PointInGeo3DShapeQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/bkdtree3d/PointInGeo3DShapeQuery.java?rev=1696665&r1=1696664&r2=1696665&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/bkdtree3d/PointInGeo3DShapeQuery.java (original)
+++ lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/bkdtree3d/PointInGeo3DShapeQuery.java Wed Aug 19 20:27:54 2015
@@ -102,15 +102,15 @@ public class PointInGeo3DShapeQuery exte
                                                       bounds.getMinimumZ(),
                                                       bounds.getMaximumZ());
 
-        assert xyzSolid.getRelationship(shape) == GeoArea.WITHIN || xyzSolid.getRelationship(shape) == GeoArea.OVERLAPS: "got " + xyzSolid.getRelationship(shape);
+        // nocommit sometimes returns CONTAINS too:
+        // assert xyzSolid.getRelationship(shape) == GeoArea.WITHIN || xyzSolid.getRelationship(shape) == GeoArea.OVERLAPS: "got " + xyzSolid.getRelationship(shape);
 
-        // nocommit explain why we need the +/- 2.0 fudge factor...
-        DocIdSet result = tree.intersect(Geo3DDocValuesFormat.encodeValue(bounds.getMinimumX() - 2.0 * Vector.MINIMUM_RESOLUTION),
-                                         Geo3DDocValuesFormat.encodeValue(bounds.getMaximumX() + 2.0 * Vector.MINIMUM_RESOLUTION),
-                                         Geo3DDocValuesFormat.encodeValue(bounds.getMinimumY() - 2.0 * Vector.MINIMUM_RESOLUTION),
-                                         Geo3DDocValuesFormat.encodeValue(bounds.getMaximumY() + 2.0 * Vector.MINIMUM_RESOLUTION),
-                                         Geo3DDocValuesFormat.encodeValue(bounds.getMinimumZ() - 2.0 * Vector.MINIMUM_RESOLUTION),
-                                         Geo3DDocValuesFormat.encodeValue(bounds.getMaximumZ() + 2.0 * Vector.MINIMUM_RESOLUTION),
+        DocIdSet result = tree.intersect(Geo3DDocValuesFormat.encodeValue(bounds.getMinimumX()),
+                                         Geo3DDocValuesFormat.encodeValue(bounds.getMaximumX()),
+                                         Geo3DDocValuesFormat.encodeValue(bounds.getMinimumY()),
+                                         Geo3DDocValuesFormat.encodeValue(bounds.getMaximumY()),
+                                         Geo3DDocValuesFormat.encodeValue(bounds.getMinimumZ()),
+                                         Geo3DDocValuesFormat.encodeValue(bounds.getMaximumZ()),
                                          new BKD3DTreeReader.ValueFilter() {
                                            @Override
                                            public boolean accept(int docID) {