idfExplain

open fun idfExplain(collectionStats: CollectionStatistics, termStats: TermStatistics): Explanation

Computes a score factor for a simple term and returns an explanation for that score factor.

The default implementation uses:

idf(docFreq, docCount);
*

Note that CollectionStatistics.docCount is used instead of because also is used, and when the latter is inaccurate, so is , and in the same direction. In addition, does not skew when fields are sparse.

Return

an Explain object that includes both an idf score factor and an explanation for the term.

Parameters

collectionStats

collection-level statistics

termStats

term-level statistics for the term


open fun idfExplain(collectionStats: CollectionStatistics, termStats: Array<TermStatistics>): Explanation

Computes a score factor for a phrase.

The default implementation sums the idf factor for each term in the phrase.

Return

an Explain object that includes both an idf score factor for the phrase and an explanation for each term.

Parameters

collectionStats

collection-level statistics

termStats

term-level statistics for the terms in the phrase