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/08/11 11:10:47 UTC

[1/2] lucene-solr:branch_7x: LUCENE-8451: Interpret IllegalArgumentException result from convex polygon constructor as meaning a tiling failure.

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x d8ecf9761 -> 924114329


LUCENE-8451: Interpret IllegalArgumentException result from convex polygon constructor as meaning a tiling failure.


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

Branch: refs/heads/branch_7x
Commit: c6da1772e881b9fdd4f8d0704c23b8a38489c0b6
Parents: 2fb8e10
Author: Karl Wright <Da...@gmail.com>
Authored: Sat Aug 11 06:58:50 2018 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Sat Aug 11 07:10:21 2018 -0400

----------------------------------------------------------------------
 .../spatial3d/geom/GeoPolygonFactory.java       | 33 ++++++++++++--------
 .../lucene/spatial3d/geom/GeoPolygonTest.java   |  2 +-
 2 files changed, 21 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c6da1772/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
index af5d8ef..301d1cc 100755
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
@@ -1443,23 +1443,30 @@ public class GeoPolygonFactory {
     }
     
     // Now, construct the polygon
-    if (testPoint != null && holes != null && holes.size() > 0) {
-      // No holes, for test
-      final GeoPolygon testPolygon = new GeoConvexPolygon(planetModel, points, null, internalEdges, returnIsInternal);
-      if (testPolygon.isWithin(testPoint)) {
-        return null;
+    // Failures in construction mean we have a polygon that is too large (>180 degrees)
+    try {
+      if (testPoint != null && holes != null && holes.size() > 0) {
+        // No holes, for test
+        final GeoPolygon testPolygon = new GeoConvexPolygon(planetModel, points, null, internalEdges, returnIsInternal);
+        if (testPolygon.isWithin(testPoint)) {
+          return null;
+        }
       }
-    }
-    
-    final GeoPolygon realPolygon = new GeoConvexPolygon(planetModel, points, holes, internalEdges, returnIsInternal);
-    if (testPoint != null && (holes == null || holes.size() == 0)) {
-      if (realPolygon.isWithin(testPoint)) {
-        return null;
+      
+      final GeoPolygon realPolygon = new GeoConvexPolygon(planetModel, points, holes, internalEdges, returnIsInternal);
+      if (testPoint != null && (holes == null || holes.size() == 0)) {
+        if (realPolygon.isWithin(testPoint)) {
+          return null;
+        }
       }
+      
+      rval.addShape(realPolygon);
+      return true;
+
+    } catch (IllegalArgumentException e) {
+      throw new TileException(e.getMessage());
     }
     
-    rval.addShape(realPolygon);
-    return true;
   }
   
   /** Check if a point is within a set of edges.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c6da1772/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 d68db13..dbdfa5e 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
@@ -1890,7 +1890,7 @@ shape:
   }
 
   @Test
-  @AwaitsFix(bugUrl="https://issues.apache.org/jira/browse/LUCENE-8451")  
+  //@AwaitsFix(bugUrl="https://issues.apache.org/jira/browse/LUCENE-8451")  
   public void testLUCENE8451() {
     //POLYGON((-2.5185339401969213 -24.093993739745027,0.0 8.828539494442529E-27,5.495998489568957E-11 -8.321407453133E-11,2.7174659198424288E-11 1.0260761462208114E-10,88.32137548549387 16.934529875343244,-87.97237709688223 39.919704493657484,-88.0876897472551 34.91204903885665,-2.5185339401969213 -24.093993739745027))
     final List<GeoPoint> points = new ArrayList<>();


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

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


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

Branch: refs/heads/branch_7x
Commit: 924114329a435baec0bfae7ba9fddf1a0ed82f16
Parents: c6da177 d8ecf97
Author: Karl Wright <Da...@gmail.com>
Authored: Sat Aug 11 07:10:35 2018 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Sat Aug 11 07:10:35 2018 -0400

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |   3 +
 .../ko/KoreanPartOfSpeechStopFilterFactory.java |  17 ++-
 .../ko/KoreanReadingFormFilterFactory.java      |   8 ++
 .../analysis/ko/KoreanTokenizerFactory.java     |  22 ++++
 solr/solr-ref-guide/src/cloud-screens.adoc      |  10 +-
 .../src/colocating-collections.adoc             |  26 ++--
 solr/solr-ref-guide/src/coreadmin-api.adoc      |   8 +-
 solr/solr-ref-guide/src/json-facet-api.adoc     | 123 +++++++++----------
 solr/solr-ref-guide/src/metrics-reporting.adoc  |   6 +-
 ...olrcloud-autoscaling-policy-preferences.adoc |  44 +++----
 ...rcloud-query-routing-and-read-tolerance.adoc |  60 ++++-----
 11 files changed, 180 insertions(+), 147 deletions(-)
----------------------------------------------------------------------