You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by iv...@apache.org on 2021/01/08 12:44:05 UTC
[lucene-solr] branch master updated: LUCENE-9641: Fix
LatLonShape#testPointIndexAndQuery test bug.
This is an automated email from the ASF dual-hosted git repository.
ivera pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new a7391fb LUCENE-9641: Fix LatLonShape#testPointIndexAndQuery test bug.
a7391fb is described below
commit a7391fb73ef9169c58bc20291fdcefcbd47fa0a8
Author: iverase <iv...@apache.org>
AuthorDate: Fri Jan 8 13:43:29 2021 +0100
LUCENE-9641: Fix LatLonShape#testPointIndexAndQuery test bug.
---
.../src/test/org/apache/lucene/document/TestLatLonShape.java | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/lucene/core/src/test/org/apache/lucene/document/TestLatLonShape.java b/lucene/core/src/test/org/apache/lucene/document/TestLatLonShape.java
index a916602..9f828f6 100644
--- a/lucene/core/src/test/org/apache/lucene/document/TestLatLonShape.java
+++ b/lucene/core/src/test/org/apache/lucene/document/TestLatLonShape.java
@@ -456,14 +456,8 @@ public class TestLatLonShape extends LuceneTestCase {
RandomIndexWriter writer = new RandomIndexWriter(random(), dir);
Document document = new Document();
Point p = GeoTestUtil.nextPoint();
- double qLat =
- p.getLat() == GeoUtils.MAX_LAT_INCL
- ? p.getLat()
- : GeoEncodingUtils.decodeLatitude(GeoEncodingUtils.encodeLatitudeCeil(p.getLat()));
- double qLon =
- p.getLon() == GeoUtils.MAX_LON_INCL
- ? p.getLon()
- : GeoEncodingUtils.decodeLongitude(GeoEncodingUtils.encodeLongitudeCeil(p.getLon()));
+ double qLat = GeoEncodingUtils.decodeLatitude(GeoEncodingUtils.encodeLatitude(p.getLat()));
+ double qLon = GeoEncodingUtils.decodeLongitude(GeoEncodingUtils.encodeLongitude(p.getLon()));
p = new Point(qLat, qLon);
Field[] fields = LatLonShape.createIndexableFields(FIELDNAME, p.getLat(), p.getLon());
for (Field f : fields) {