You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2019/10/10 19:59:27 UTC

[GitHub] [lucene-solr] nknize commented on a change in pull request #878: LUCENE-8746: Refactor EdgeTree

nknize commented on a change in pull request #878: LUCENE-8746: Refactor EdgeTree 
URL: https://github.com/apache/lucene-solr/pull/878#discussion_r332617039
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/document/LatLonPointInPolygonQuery.java
 ##########
 @@ -133,28 +133,25 @@ public Relation compare(byte[] minPackedValue, byte[] maxPackedValue) {
             double cellMaxLat = decodeLatitude(maxPackedValue, 0);
             double cellMaxLon = decodeLongitude(maxPackedValue, Integer.BYTES);
 
-            return tree.relate(cellMinLat, cellMaxLat, cellMinLon, cellMaxLon);
+            return tree.relate(cellMinLon, cellMaxLon, cellMinLat, cellMaxLat);
           }
         };
   }
 
   @Override
   public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException {
 
+    final Component2D tree = Polygon2D.create(polygons);
 
 Review comment:
   Can we push these variables into `getIntersectVisitor`? That would delay creating the bounding box, `Component2D`, and `PolygonPredicate` objects until the visitor is needed and save unnecessary computation when no docs contain point fields. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org