Computes a score factor for a simple term.
The default implementation is:
Namespace: Lucene.Net.Search
return idf(searcher.docFreq(term), searcher.maxDoc());
Note that {@link Searcher#MaxDoc()} is used instead of
{@link Lucene.Net.Index.IndexReader#NumDocs()} because it is proportional to
{@link Searcher#DocFreq(Term)} , i.e., when one is inaccurate,
so is the other, and in the same direction.
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
| C# |
|---|
[ObsoleteAttribute("see IdfExplain(Term, Searcher)")] public virtual float Idf( Term term, Searcher searcher ) |
| Visual Basic |
|---|
<ObsoleteAttribute("see IdfExplain(Term, Searcher)")> _ Public Overridable Function Idf ( _ term As Term, _ searcher As Searcher _ ) As Single |
| Visual C++ |
|---|
[ObsoleteAttribute(L"see IdfExplain(Term, Searcher)")] public: virtual float Idf( Term^ term, Searcher^ searcher ) |
Parameters
- term
- Type: Lucene.Net.Index..::..Term
the term in question
- searcher
- Type: Lucene.Net.Search..::..Searcher
the document collection being searched