idf

abstract fun idf(docFreq: Long, docCount: Long): Float

Computes a score factor based on a term's document frequency (the number of documents which contain the term). This value is multiplied by the .tf factor for each term in the query and these products are then summed to form the initial score for a document.

Terms that occur in fewer documents are better indicators of topic, so implementations of this method usually return larger values for rare terms, and smaller values for common terms.

Return

a score factor based on the term's document frequency

Parameters

docFreq

the number of documents which contain the term

docCount

the total number of documents in the collection