throws IOException {
DirectoryReader reader = DirectoryReader.open(directory);
try {
LOG.info("Applying deletes in reader [{0}]", reader);
CompositeReaderContext compositeReaderContext = reader.getContext();
List<AtomicReaderContext> leaves = compositeReaderContext.leaves();
BlurPartitioner blurPartitioner = new BlurPartitioner();
Text key = new Text();
int numberOfShards = _shardContext.getTableContext().getDescriptor().getShardCount();
int shardId = BlurUtil.getShardIndex(shard);
for (AtomicReaderContext context : leaves) {