Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(conf);
RetrievalEnvironment env = new RetrievalEnvironment(indexPath, fs);
DfTableArray dfs = new DfTableArray(new Path(env.getDfByIntData()), fs);
Path termsFilePath = new Path(env.getIndexTermsData());
Path termIDsFilePath = new Path(env.getIndexTermIdsData());
Path idToTermFilePath = new Path(env.getIndexTermIdMappingData());
DefaultFrequencySortedDictionary termIDMap = new DefaultFrequencySortedDictionary(termsFilePath, termIDsFilePath, idToTermFilePath, fs);
for (int i=1; i<=200; i++) {
System.out.println(String.format("%d\t%s\t%d", i, termIDMap.getTerm(i), dfs.getDf(i)));
}
}