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 2018/04/08 10:44:53 UTC

[1/2] lucene-solr:master: LUCENE-8245: Adjust envelope to not leave as big a gap between travel planes and above/below planes.

Repository: lucene-solr
Updated Branches:
  refs/heads/master 2ae488aae -> bd8fe7242


LUCENE-8245: Adjust envelope to not leave as big a gap between travel planes and above/below planes.


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

Branch: refs/heads/master
Commit: 348de9e8b59d1ba6cf37999fe4c11c8365147fdd
Parents: aba793d
Author: Karl Wright <Da...@gmail.com>
Authored: Sun Apr 8 06:44:10 2018 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Sun Apr 8 06:44:10 2018 -0400

----------------------------------------------------------------------
 .../org/apache/lucene/spatial3d/geom/Plane.java |  2 +-
 .../lucene/spatial3d/geom/GeoPolygonTest.java   | 32 ++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/348de9e8/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java
index fe3418c..34a2fce 100755
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Plane.java
@@ -24,7 +24,7 @@ package org.apache.lucene.spatial3d.geom;
  */
 public class Plane extends Vector {
   /** For plane envelopes, we need a small distance that can't lead to numerical confusion. */
-  public final static double MINIMUM_PLANE_OFFSET = MINIMUM_RESOLUTION * 1.5;
+  public final static double MINIMUM_PLANE_OFFSET = MINIMUM_RESOLUTION * 1.1;
   /** An array with no points in it */
   public final static GeoPoint[] NO_POINTS = new GeoPoint[0];
   /** An array with no bounds in it */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/348de9e8/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
index 581112d..d1e6688 100755
--- a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
+++ b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
@@ -1469,5 +1469,37 @@ shape:
     final GeoPoint point3 = new GeoPoint(PlanetModel.SPHERE, 0, 1e-6);
     assertTrue(polygon.isWithin(point3) == largePolygon.isWithin(point3));
   }
+
+  @Test
+  public void testAboveBelowCrossingDifferentEdges() {
+    //POLYGON((130.846821906638 -5.066128831305991,134.5635278421427 21.75703481126756,156.31803093908155 44.5755831677161,0.0 8.860146581178396E-33,130.846821906638 -5.066128831305991))
+    final List<GeoPoint> points = new ArrayList<>();
+    points.add(new GeoPoint(PlanetModel.SPHERE, Geo3DUtil.fromDegrees(-5.066128831305991), Geo3DUtil.fromDegrees(130.846821906638)));
+    points.add(new GeoPoint(PlanetModel.SPHERE, Geo3DUtil.fromDegrees(21.75703481126756), Geo3DUtil.fromDegrees(134.5635278421427)));
+    points.add(new GeoPoint(PlanetModel.SPHERE, Geo3DUtil.fromDegrees(44.5755831677161), Geo3DUtil.fromDegrees(156.31803093908155)));
+    points.add(new GeoPoint(PlanetModel.SPHERE, Geo3DUtil.fromDegrees(8.860146581178396E-33), Geo3DUtil.fromDegrees(0.0)));
+    final GeoPolygonFactory.PolygonDescription description = new GeoPolygonFactory.PolygonDescription(points);
+    final GeoPolygon polygon = GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE, description);
+    final GeoPolygon largePolygon = GeoPolygonFactory.makeLargeGeoPolygon(PlanetModel.SPHERE, Collections.singletonList(description));
+    //POINT(-15.37308034708334 1.3353777223310798E-11)
+    final GeoPoint point1 = new GeoPoint(PlanetModel.SPHERE, Geo3DUtil.fromDegrees(1.3353777223310798E-11), Geo3DUtil.fromDegrees(-15.37308034708334));
+    assertTrue(polygon.isWithin(point1) == largePolygon.isWithin(point1));
+  }
+
+  @Test
+  public void testBelowCrossingTwiceEdgePoint() {
+    //POLYGON((162.9024012378976 -0.17652184258966092,162.56882659034474 -0.009075185910497524,162.52932263918404 1.6235907240799453E-189,162.17731099253956 -0.2154890860855618,162.9024012378976 -0.17652184258966092))
+    List<GeoPoint> points = new ArrayList<>();
+    points.add(new GeoPoint(PlanetModel.SPHERE, Geo3DUtil.fromDegrees(-0.17652184258966092), Geo3DUtil.fromDegrees(162.9024012378976)));
+    points.add(new GeoPoint(PlanetModel.SPHERE, Geo3DUtil.fromDegrees(-0.009075185910497524), Geo3DUtil.fromDegrees(162.56882659034474)));
+    points.add(new GeoPoint(PlanetModel.SPHERE, Geo3DUtil.fromDegrees(1.6235907240799453E-189), Geo3DUtil.fromDegrees(162.52932263918404)));
+    points.add(new GeoPoint(PlanetModel.SPHERE, Geo3DUtil.fromDegrees(-0.2154890860855618), Geo3DUtil.fromDegrees(162.17731099253956)));
+    final GeoPolygonFactory.PolygonDescription description = new GeoPolygonFactory.PolygonDescription(points);
+    final GeoPolygon polygon = GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE, description);
+    final GeoPolygon largePolygon = GeoPolygonFactory.makeLargeGeoPolygon(PlanetModel.SPHERE, Collections.singletonList(description));
+    //POINT(91.60559215160585 -6.782152464351765E-11)
+    final GeoPoint point = new GeoPoint(PlanetModel.SPHERE, Geo3DUtil.fromDegrees(-6.782152464351765E-11), Geo3DUtil.fromDegrees(91.60559215160585));
+    assertTrue(polygon.isWithin(point) == largePolygon.isWithin(point));
+  }
   
 }


[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/bd8fe724
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/bd8fe724
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/bd8fe724

Branch: refs/heads/master
Commit: bd8fe72426b2a9df45050143e85481f523854239
Parents: 348de9e 2ae488a
Author: Karl Wright <Da...@gmail.com>
Authored: Sun Apr 8 06:44:45 2018 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Sun Apr 8 06:44:45 2018 -0400

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |  5 +++
 .../miscellaneous/WordDelimiterFilter.java      | 18 +++++---
 .../miscellaneous/WordDelimiterGraphFilter.java | 17 +++++---
 .../apache/lucene/index/TestIndexSorting.java   |  7 +--
 solr/CHANGES.txt                                |  3 ++
 .../solr/handler/TestReplicationHandler.java    |  8 +++-
 .../solr/uninverting/TestDocTermOrds.java       | 12 ++++--
 solr/solr-ref-guide/build.xml                   |  1 +
 solr/solr-ref-guide/src/_config.yml.template    |  1 +
 solr/solr-ref-guide/src/css/customstyles.css    |  2 +-
 solr/solr-ref-guide/src/learning-to-rank.adoc   |  2 +-
 solr/solr-ref-guide/src/meta-docs/pdf.adoc      |  2 +-
 .../src/rule-based-replica-placement.adoc       |  2 +-
 .../src/updating-parts-of-documents.adoc        | 45 +++++++++++++++++---
 .../src/upgrading-a-solr-cluster.adoc           |  2 +-
 ...store-data-with-the-data-import-handler.adoc |  2 +-
 16 files changed, 93 insertions(+), 36 deletions(-)
----------------------------------------------------------------------