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:54:59 UTC
[1/2] lucene-solr:master: 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/master 9d0da3156 -> 9aefe193c
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/7bd116c4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7bd116c4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7bd116c4
Branch: refs/heads/master
Commit: 7bd116c4477dda5a5277c56e20339147b9dc6c39
Parents: a7b1383
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:53:59 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/7bd116c4/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/7bd116c4/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:master: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/lucene-solr
Posted by kw...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/lucene-solr
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9aefe193
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9aefe193
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9aefe193
Branch: refs/heads/master
Commit: 9aefe193c93339e595b8441352fed26b55aba5d7
Parents: 7bd116c 9d0da31
Author: Karl Wright <Da...@gmail.com>
Authored: Mon Apr 18 13:54:16 2016 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Mon Apr 18 13:54:16 2016 -0400
----------------------------------------------------------------------
solr/CHANGES.txt | 3 +++
solr/core/src/java/org/apache/solr/util/SolrCLI.java | 7 +++----
2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------