private void loadCurrentIndex() throws IOException { inMemoryIndex.clear(); GeoSegmentReader<IDGeoRecord> currentIndex = getGeoSegmentReader(); try { Iterator<IDGeoRecord> currentIndexIterator = currentIndex.getIterator( IDGeoRecord.MIN_VALID_GEORECORD, IDGeoRecord.MAX_VALID_GEORECORD); while (currentIndexIterator.hasNext()) { IDGeoRecord geoRecord = currentIndexIterator.next(); if (!removedRecords.contains(geoRecord.id)) { inMemoryIndex.add(geoRecord); } } } finally { currentIndex.close(); } }