handle cases when there is no value
This commit is contained in:
parent
9af288a42f
commit
484665af80
|
@ -96,6 +96,10 @@ public class GeoDistanceFilter extends Filter {
|
|||
}
|
||||
|
||||
@Override public boolean get(int doc) throws IOException {
|
||||
if (!latFieldData.hasValue(doc) || !lonFieldData.hasValue(doc)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (latFieldData.multiValued()) {
|
||||
double[] lats = latFieldData.doubleValues(doc);
|
||||
double[] lons = latFieldData.doubleValues(doc);
|
||||
|
|
Loading…
Reference in New Issue