private List<GeoSegmentReader<CartesianGeoRecord>> buildGeoSegmentReaders(GeoSearchConfig geoSearchConfig) throws IOException {
geoSegmentReaders = new ArrayList<GeoSegmentReader<CartesianGeoRecord>>();
if (subGeoReaders == null || subGeoReaders.size() == 0) {
if (in instanceof SegmentReader) {
SegmentReader segmentReader = (SegmentReader) in;
int maxDoc = segmentReader.maxDoc();
String segmentName = segmentReader.getSegmentName();
String geoSegmentName = geoSearchConfig.getGeoFileName(segmentName);
GeoSegmentReader<CartesianGeoRecord> geoSegmentReader = new GeoSegmentReader<CartesianGeoRecord>(
directory(), geoSegmentName, maxDoc, DEFAULT_BUFFER_SIZE_PER_SEGMENT,
geoRecordSerializer, geoRecordComparator);
geoSegmentReaders.add(geoSegmentReader);