this test uses NaN to mean missing. don't try to quantize it.

This commit is contained in:
Robert Muir 2016-03-28 16:02:02 -04:00
parent 9189bdc1c2
commit 7476d0622f
1 changed files with 7 additions and 2 deletions

View File

@ -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);