Karl: reviewing recent commits I notice you've been backporting a handful 
of (what appear to be) "Improvements" / "Features" to branch_6x ... but 
branch_6x is too old for feature releases -- so i'm confused as to the 
point ofthese commits?

If these jira's/changes are misslabeled and are actaully "bug fixes" then 
these commits could/should also be merged to the latest ^.x release branch 
(branch_6_6) for a potential bug fix release from there.

So basically my confusion is: If these are "features" then there should 
have been "one fewer" commits (master and 7x only) ... if they are "bug 
fixes" then there should have been "one additional" commit (master, 7x, 
6x, and 6_6)

        ?


: Date: Wed, 22 Nov 2017 12:04:08 +0000 (UTC)
: From: kwri...@apache.org
: Reply-To: dev@lucene.apache.org
: To: comm...@lucene.apache.org
: Subject: lucene-solr:branch_6x: LUCENE-8056: Use perpendicular edge planes for
:      segments.
: 
: Repository: lucene-solr
: Updated Branches:
:   refs/heads/branch_6x 58f07e0d5 -> 8ee9171ac
: 
: 
: LUCENE-8056: Use perpendicular edge planes for segments.
: 
: 
: Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
: Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/8ee9171a
: Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8ee9171a
: Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8ee9171a
: 
: Branch: refs/heads/branch_6x
: Commit: 8ee9171ac6098a256f3477c281cb78a20f048ab9
: Parents: 58f07e0
: Author: Karl Wright <daddy...@gmail.com>
: Authored: Wed Nov 22 06:51:19 2017 -0500
: Committer: Karl Wright <daddy...@gmail.com>
: Committed: Wed Nov 22 07:03:53 2017 -0500
: 
: ----------------------------------------------------------------------
:  lucene/CHANGES.txt                              |  3 +++
:  .../lucene/spatial3d/geom/GeoExactCircle.java   | 24 ++++++++------------
:  .../lucene/spatial3d/geom/GeoCircleTest.java    | 15 +++++++++++-
:  3 files changed, 27 insertions(+), 15 deletions(-)
: ----------------------------------------------------------------------
: 
: 
: 
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8ee9171a/lucene/CHANGES.txt
: ----------------------------------------------------------------------
: diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
: index dcf4390..4850c875 100644
: --- a/lucene/CHANGES.txt
: +++ b/lucene/CHANGES.txt
: @@ -40,6 +40,9 @@ New Features
:  
:  Bug Fixes
:  
: +* LUCENE-8056: Exact circle segment bounding suffered from precision errors.
: +  (Karl Wright)
: +
:  * LUCENE-8054: Fix the exact circle case where relationships fail when the
:    planet model has c <= ab, because the planes are constructed incorrectly.
:    (Ignacio Vera)
: 
: 
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8ee9171a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoExactCircle.java
: ----------------------------------------------------------------------
: diff --git 
a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoExactCircle.java
 
b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoExactCircle.java
: index cedcab5..bbd1ff0 100644
: --- 
a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoExactCircle.java
: +++ 
b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoExactCircle.java
: @@ -145,7 +145,9 @@ class GeoExactCircle extends GeoBaseCircle {
:      // If it turns out that there's only one circle plane, this array will 
be populated but unused
:      final List<GeoPoint[]> notableEdgePoints = new 
ArrayList<>(activeSlices.size());
:      // Back planes
: -    final List<Membership> backPlanes = new ArrayList<>(activeSlices.size());
: +    final Map<Membership, Membership> backPlanes = new 
HashMap<>(activeSlices.size());
: +    // Bounds
: +    final Map<Membership, Membership> bounds = new 
HashMap<>(activeSlices.size());
:      
:      // Compute bounding planes and actual circle planes
:      for (int i = 0; i < activeSlices.size(); i++) {
: @@ -198,13 +200,15 @@ class GeoExactCircle extends GeoBaseCircle {
:        }
:        
:        circlePlanes.add(pd.plane);
: -      backPlanes.add(backPlane);
: +      if (backPlane != null) {
: +        backPlanes.put(pd.plane, backPlane);
: +      }
:        notableEdgePoints.add(new GeoPoint[]{pd.endPoint1, pd.endPoint2});
: +      bounds.put(pd.plane, new EitherBound(new SidedPlane(pd.onSidePoint, 
pd.endPoint1, center), new SidedPlane(pd.onSidePoint, pd.endPoint2, center)));
:      }
:  
:      //System.out.println("Number of planes needed: "+circlePlanes.size());
:        
: -    this.edgePoints = new GeoPoint[]{edgePoint};      
:      this.circlePlanes = circlePlanes;
:      // Compute bounds
:      if (circlePlanes.size() == 1) {
: @@ -213,19 +217,11 @@ class GeoExactCircle extends GeoBaseCircle {
:        this.notableEdgePoints = null;
:      } else {
:        this.notableEdgePoints = notableEdgePoints;
: -      this.backBounds = new HashMap<>(circlePlanes.size());
: -      this.eitherBounds = new HashMap<>(circlePlanes.size());
: -      for (int i = 0; i < circlePlanes.size(); i++) {
: -        final SidedPlane thisPlane = circlePlanes.get(i);
: -        final SidedPlane previousPlane = (i == 
0)?circlePlanes.get(circlePlanes.size()-1):circlePlanes.get(i-1);
: -        final SidedPlane nextPlane = (i == 
circlePlanes.size()-1)?circlePlanes.get(0):circlePlanes.get(i+1);
: -        if (backPlanes.get(i) != null) {
: -          backBounds.put(thisPlane, backPlanes.get(i));
: -        }
: -        eitherBounds.put(thisPlane, new EitherBound(previousPlane, 
nextPlane));
: -      }
: +      this.eitherBounds = bounds;
: +      this.backBounds = backPlanes;
:      }
:      
: +    this.edgePoints = new GeoPoint[]{edgePoint};      
:      //System.out.println("Is edgepoint within? "+isWithin(edgePoint));
:    }
:  
: 
: 
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8ee9171a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoCircleTest.java
: ----------------------------------------------------------------------
: diff --git 
a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoCircleTest.java 
b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoCircleTest.java
: index 9206e4f..d203b09 100755
: --- 
a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoCircleTest.java
: +++ 
b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoCircleTest.java
: @@ -520,5 +520,18 @@ public class GeoCircleTest extends LuceneTestCase {
:      int rel = circle1.getRelationship(circle2);
:      assertTrue(rel != GeoArea.DISJOINT);
:    }
: -  
: +
: +  @Test
: +  public void testLUCENE8056(){
: +    GeoCircle circle = 
GeoCircleFactory.makeExactGeoCircle(PlanetModel.WGS84, 0.647941905154693, 
0.8542472362428436, 0.8917883700569315, 1.2173787103955335E-8);
: +    GeoBBox bBox = GeoBBoxFactory.makeGeoBBox(PlanetModel.WGS84, 
0.5890486225480862, 0.4908738521234052, 1.9634954084936207, 2.159844949342983);
: +    //Center iis out of the shape
: +    assertFalse(circle.isWithin(bBox.getCenter()));
: +    //Edge point is in the shape
: +    assertTrue(circle.isWithin(bBox.getEdgePoints()[0]));
: +    //Shape should intersect!!!
: +    assertTrue(bBox.getRelationship(circle) == GeoArea.OVERLAPS);
: +  }
: +
: +
:  }
: 
: 

-Hoss
http://www.lucidworks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to