if (states[i]) {
out.writeString((String) keys[i]);
CollectionStatistics statistics = (CollectionStatistics) values[i];
assert statistics.maxDoc() >= 0;
out.writeVLong(statistics.maxDoc());
out.writeVLong(addOne(statistics.docCount()));
out.writeVLong(addOne(statistics.sumTotalTermFreq()));
out.writeVLong(addOne(statistics.sumDocFreq()));
}
}
}