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/26 23:20:38 UTC

svn commit: r1698004 - in /lucene/dev/branches/lucene6699/lucene/spatial3d/src: java/org/apache/lucene/geo3d/Vector.java java/org/apache/lucene/geo3d/XYZBounds.java test/org/apache/lucene/bkdtree3d/TestGeo3DPointField.java

Author: mikemccand
Date: Wed Aug 26 21:20:37 2015
New Revision: 1698004

URL: http://svn.apache.org/r1698004
Log:
LUCENE-6699: increase fudge factor; don't check hits if quantization changed the expected result

Modified:
    lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/geo3d/Vector.java
    lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/geo3d/XYZBounds.java
    lucene/dev/branches/lucene6699/lucene/spatial3d/src/test/org/apache/lucene/bkdtree3d/TestGeo3DPointField.java

Modified: lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/geo3d/Vector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/geo3d/Vector.java?rev=1698004&r1=1698003&r2=1698004&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/geo3d/Vector.java (original)
+++ lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/geo3d/Vector.java Wed Aug 26 21:20:37 2015
@@ -28,7 +28,7 @@ public class Vector {
    * Values that are all considered to be essentially zero have a magnitude
    * less than this.
    */
-  public static final double MINIMUM_RESOLUTION = 1.5e-12;//7.5e-11;
+  public static final double MINIMUM_RESOLUTION = 5.0e-13;
   /**
    * For squared quantities, the bound is squared too.
    */

Modified: lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/geo3d/XYZBounds.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/geo3d/XYZBounds.java?rev=1698004&r1=1698003&r2=1698004&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/geo3d/XYZBounds.java (original)
+++ lucene/dev/branches/lucene6699/lucene/spatial3d/src/java/org/apache/lucene/geo3d/XYZBounds.java Wed Aug 26 21:20:37 2015
@@ -30,7 +30,7 @@ public class XYZBounds implements Bounds
    * of the shape, and we cannot guarantee that without making MINIMUM_RESOLUTION
    * unacceptably large.
    */
-  protected static final double FUDGE_FACTOR = Vector.MINIMUM_RESOLUTION * 10000.0;
+  protected static final double FUDGE_FACTOR = Vector.MINIMUM_RESOLUTION * 50000.0;
   
   /** Minimum x */
   protected Double minX = null;

Modified: lucene/dev/branches/lucene6699/lucene/spatial3d/src/test/org/apache/lucene/bkdtree3d/TestGeo3DPointField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/lucene/spatial3d/src/test/org/apache/lucene/bkdtree3d/TestGeo3DPointField.java?rev=1698004&r1=1698003&r2=1698004&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/lucene/spatial3d/src/test/org/apache/lucene/bkdtree3d/TestGeo3DPointField.java (original)
+++ lucene/dev/branches/lucene6699/lucene/spatial3d/src/test/org/apache/lucene/bkdtree3d/TestGeo3DPointField.java Wed Aug 26 21:20:37 2015
@@ -620,6 +620,13 @@ public class TestGeo3DPointField extends
                                                  decodeValue(encodeValue(point1.y)),
                                                  decodeValue(encodeValue(point1.z)));
 
+                  if (shape.isWithin(point1) != shape.isWithin(point2)) {
+                    if (VERBOSE) {
+                      System.out.println("  skip checking docID=" + docID + " quantization changed the expected result from " + shape.isWithin(point1) + " to " + shape.isWithin(point2));
+                    }
+                    continue;
+                  }
+
                   boolean expected = ((deleted.contains(id) == false) && shape.isWithin(point2));
                   if (hits.get(docID) != expected) {
                     fail(Thread.currentThread().getName() + ": iter=" + iter + " id=" + id + " docID=" + docID + " lat=" + lats[id] + " lon=" + lons[id] + " expected " + expected + " but got: " + hits.get(docID) + " deleted?=" + deleted.contains(id) + "\n  point1=" + point1 + ", iswithin="+shape.isWithin(point1)+"\n  point2=" + point2 + ", iswithin="+shape.isWithin(point2) + "\n  query=" + query);
@@ -643,4 +650,3 @@ public class TestGeo3DPointField extends
     IOUtils.close(r, dir);
   }
 }
-