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/04/18 19:57:05 UTC

[1/2] lucene-solr:branch_6x: LUCENE-7228: Bounds computations which use Lagrangian multipliers are inherently less precise, so make sure that the bounds values exceed the size of the shape by a comfortable amount.

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 57270a5fb -> 6d95c5b6d


LUCENE-7228: Bounds computations which use Lagrangian multipliers are inherently less precise, so make sure that the bounds values exceed the size of the shape by a comfortable amount.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1f23ca5e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1f23ca5e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1f23ca5e

Branch: refs/heads/branch_6x
Commit: 1f23ca5ea426ba94a4dc7a2b525bd2aa41f34890
Parents: 90debd8
Author: Karl Wright <Da...@gmail.com>
Authored: Mon Apr 18 13:53:59 2016 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Mon Apr 18 13:55:50 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/lucene/spatial3d/geom/XYZBounds.java |  2 +-
 .../test/org/apache/lucene/spatial3d/TestGeo3DPoint.java | 11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1f23ca5e/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/XYZBounds.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/XYZBounds.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/XYZBounds.java
index 4b15014..3df4694 100644
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/XYZBounds.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/XYZBounds.java
@@ -29,7 +29,7 @@ public class XYZBounds implements Bounds {
    * of the shape, and we cannot guarantee that without making MINIMUM_RESOLUTION
    * unacceptably large.
    */
-  private static final double FUDGE_FACTOR = Vector.MINIMUM_RESOLUTION * 2.0;
+  private static final double FUDGE_FACTOR = Vector.MINIMUM_RESOLUTION * 500.0;
   
   /** Minimum x */
   private Double minX = null;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1f23ca5e/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java
index b9532f8..516cdf8 100644
--- a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java
+++ b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/TestGeo3DPoint.java
@@ -796,6 +796,10 @@ public class TestGeo3DPoint extends LuceneTestCase {
         GeoPoint unquantizedPoint = unquantizedPoints[id];
         if (point != null && unquantizedPoint != null) {
           GeoShape shape = ((PointInGeo3DShapeQuery)query).getShape();
+          XYZBounds bounds = new XYZBounds();
+          shape.getBounds(bounds);
+          XYZSolid solid = XYZSolidFactory.makeXYZSolid(PlanetModel.WGS84, bounds.getMinimumX(), bounds.getMaximumX(), bounds.getMinimumY(), bounds.getMaximumY(), bounds.getMinimumZ(), bounds.getMaximumZ());
+
           boolean expected = ((deleted.contains(id) == false) && shape.isWithin(point));
           if (hits.get(docID) != expected) {
             StringBuilder b = new StringBuilder();
@@ -804,13 +808,14 @@ public class TestGeo3DPoint extends LuceneTestCase {
             } else {
               b.append("FAIL: id=" + id + " should not have matched but did\n");
             }
-            b.append("  shape=" + ((PointInGeo3DShapeQuery)query).getShape() + "\n");
+            b.append("  shape=" + shape + "\n");
+            b.append("  bounds=" + bounds + "\n");
             b.append("  world bounds=(" +
               " minX=" + PlanetModel.WGS84.getMinimumXValue() + " maxX=" + PlanetModel.WGS84.getMaximumXValue() +
               " minY=" + PlanetModel.WGS84.getMinimumYValue() + " maxY=" + PlanetModel.WGS84.getMaximumYValue() +
               " minZ=" + PlanetModel.WGS84.getMinimumZValue() + " maxZ=" + PlanetModel.WGS84.getMaximumZValue() + "\n");
-            b.append("  quantized point=" + point + " within shape? "+shape.isWithin(point)+"\n");
-            b.append("  unquantized point=" + unquantizedPoint + " within shape? "+shape.isWithin(unquantizedPoint)+"\n");
+            b.append("  quantized point=" + point + " within shape? "+shape.isWithin(point)+" within bounds? "+solid.isWithin(point)+"\n");
+            b.append("  unquantized point=" + unquantizedPoint + " within shape? "+shape.isWithin(unquantizedPoint)+" within bounds? "+solid.isWithin(unquantizedPoint)+"\n");
             b.append("  docID=" + docID + " deleted?=" + deleted.contains(id) + "\n");
             b.append("  query=" + query + "\n");
             b.append("  explanation:\n    " + explain("point", shape, point, unquantizedPoint, r, docID).replace("\n", "\n  "));


[2/2] lucene-solr:branch_6x: Merge branch 'branch_6x' of https://git-wip-us.apache.org/repos/asf/lucene-solr into branch_6x

Posted by kw...@apache.org.
Merge branch 'branch_6x' of https://git-wip-us.apache.org/repos/asf/lucene-solr into branch_6x


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6d95c5b6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6d95c5b6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6d95c5b6

Branch: refs/heads/branch_6x
Commit: 6d95c5b6d62732c6dcf8f648cc4f7ce2922a1d27
Parents: 1f23ca5 57270a5
Author: Karl Wright <Da...@gmail.com>
Authored: Mon Apr 18 13:56:58 2016 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Mon Apr 18 13:56:58 2016 -0400

----------------------------------------------------------------------
 solr/CHANGES.txt                                     | 3 +++
 solr/core/src/java/org/apache/solr/util/SolrCLI.java | 7 +++----
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------