if (!(reader instanceof GeoIndexReader)) {
throw new RuntimeException("attempt to create a "
+GeoScorer.class+" with a reader that was not a "
+GeoIndexReader.class);
}
GeoIndexReader geoIndexReader = (GeoIndexReader) reader;
List<GeoSegmentReader<CartesianGeoRecord>> segmentsInOrder = geoIndexReader.getGeoSegmentReaders();
IDeletedDocs wholeIndexDeletedDocs = new IndexReaderDeletedDocs(reader);
return new GeoScorer(this, segmentsInOrder, wholeIndexDeletedDocs,
geoQuery.getCentroidLatitude(), geoQuery.getCentroidLongitude(), geoQuery.rangeInKm);
}