Method IdfExplain
IdfExplain(CollectionStatistics, TermStatistics)
Computes a score factor for a simple term and returns an explanation for that score factor.
The default implementation uses:
Idf(docFreq, searcher.MaxDoc);
Note that MaxDoc is used instead of Lucene.Net.Index.IndexReader.IntNumDocs because also DocFreq is used, and when the latter is inaccurate, so is MaxDoc, and in the same direction. In addition, MaxDoc is more efficient to compute
Declaration
public virtual Explanation IdfExplain(CollectionStatistics collectionStats, TermStatistics termStats)
Parameters
Type | Name | Description |
---|---|---|
CollectionStatistics | collectionStats | collection-level statistics |
TermStatistics | termStats | term-level statistics for the term |
Returns
Type | Description |
---|---|
Explanation | an Explanation object that includes both an idf score factor and an explanation for the term. |
IdfExplain(CollectionStatistics, TermStatistics[])
Computes a score factor for a phrase.
The default implementation sums the idf factor for each term in the phrase.
Declaration
public virtual Explanation IdfExplain(CollectionStatistics collectionStats, TermStatistics[] termStats)
Parameters
Type | Name | Description |
---|---|---|
CollectionStatistics | collectionStats | collection-level statistics |
TermStatistics[] | termStats | term-level statistics for the terms in the phrase |
Returns
Type | Description |
---|---|
Explanation | an Explanation object that includes both an idf score factor for the phrase and an explanation for each term. |