mirror of https://github.com/apache/lucene.git
this test uses NaN to mean missing. don't try to quantize it.
This commit is contained in:
parent
9189bdc1c2
commit
7476d0622f
|
@ -726,11 +726,16 @@ public abstract class BaseGeoPointTestCase extends LuceneTestCase {
|
|||
|
||||
private void verify(boolean small, double[] lats, double[] lons) throws Exception {
|
||||
// quantize each value the same way the index does
|
||||
// NaN means missing for the doc!!!!!
|
||||
for (int i = 0; i < lats.length; i++) {
|
||||
lats[i] = quantizeLat(lats[i]);
|
||||
if (!Double.isNaN(lats[i])) {
|
||||
lats[i] = quantizeLat(lats[i]);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < lons.length; i++) {
|
||||
lons[i] = quantizeLon(lons[i]);
|
||||
if (!Double.isNaN(lons[i])) {
|
||||
lons[i] = quantizeLon(lons[i]);
|
||||
}
|
||||
}
|
||||
verifyRandomRectangles(small, lats, lons);
|
||||
verifyRandomDistances(small, lats, lons);
|
||||
|
|
Loading…
Reference in New Issue