* @return the term frequencies as an array which is parallel to the term
* ids
* @throws java.io.IOException
*/
public LongBigList getTermFrequency() throws IOException {
LongBigList list = termfrequencies.get();
if (list == null) {
File frequenciesFile = new File(directory, String.format("%s-%s%s",
basename, field, DiskBasedIndex.COUNTS_EXTENSION));
LOGGER.info("Loading term frequencies from file " +
frequenciesFile);
list = new LongBigArrayBigList(index.numberOfTerms);
final InputBitStream in = new InputBitStream(frequenciesFile);
for (long i = 0; i < list.size64(); i++)
list.set(i, in.readLongGamma());
in.close();
termfrequencies = new SoftReference<>(list);
LOGGER.info("Completed.");
}