CloseableIterator<KeyValue<T>> it = baseInterface.iterator();
while (it.hasNext()) {
KeyValue<T> curr = it.next();
T value = curr.getValue();
for (long indexKey : indexer.convertToIndexes(value)) {
indexedDataInterface.write(indexKey, new LongList(curr.getKey()));
}
}
it.close();
indexedDataInterface.flush();
}