text: public Explanation idfExplain(CollectionStatistics collectionStats, TermStatistics termStats) {final long df = termStats.docFreq();final long docCount = collectionStats.docCount();final float idf = idf(df, docCount);return Explanation.match(idf, "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",Explanation.match(df, "n, number of documents containing term"),Explanation.match(docCount, "N, total number of documents with field"));}