jpountz commented on a change in pull request #756: LUCENE-8896: Override
default implementation of IntersectVisitor#visit(DocIDSetBuilder, byte[]) for
several queries
URL: https://github.com/apache/lucene-solr/pull/756#discussion_r299317019
##########
File path:
lucene/core/src/java/org/apache/lucene/document/LatLonPointDistanceQuery.java
##########
@@ -206,53 +256,24 @@ public void visit(int docID) {
@Override
public void visit(int docID, byte[] packedValue) {
- // bounding box check
- if (Arrays.compareUnsigned(packedValue, 0, Integer.BYTES, maxLat,
0, Integer.BYTES) > 0 ||
- Arrays.compareUnsigned(packedValue, 0, Integer.BYTES, minLat,
0, Integer.BYTES) < 0) {
- // latitude out of bounding box range
- return;
- }
-
- if ((Arrays.compareUnsigned(packedValue, Integer.BYTES,
Integer.BYTES + Integer.BYTES, maxLon, 0, Integer.BYTES) > 0 ||
- Arrays.compareUnsigned(packedValue, Integer.BYTES,
Integer.BYTES + Integer.BYTES, minLon, 0, Integer.BYTES) < 0)
- && Arrays.compareUnsigned(packedValue, Integer.BYTES,
Integer.BYTES + Integer.BYTES, minLon2, 0, Integer.BYTES) < 0) {
- // longitude out of bounding box range
- return;
+ if (matches(packedValue) == true) {
Review comment:
no need for `== true` (there are a couple more occurrences below)
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]