mirror of https://github.com/apache/lucene.git
LUCENE-9641: Fix LatLonShape#testPointIndexAndQuery test bug.
This commit is contained in:
parent
14009f4424
commit
a7391fb73e
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue