This method is not thread safe, be sure to only call it when no query is running! If you re-use the same query instance for another search, be sure to first reset the term counter with {@link #clearTotalNumberOfTerms}.
On optimized indexes / no MultiReaders, you get the correct number of unique terms for the whole index. Use this number to compare different queries. For non-optimized indexes this number can also be achived in non-constant-score mode. In constant-score mode you get the total number of terms seeked for all segments / sub-readers.
Namespace: Lucene.Net.Search
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
C# |
---|
public virtual int GetTotalNumberOfTerms() |
Visual Basic |
---|
Public Overridable Function GetTotalNumberOfTerms As Integer |
Visual C++ |
---|
public: virtual int GetTotalNumberOfTerms() |
Return Value
[Missing <returns> documentation for "M:Lucene.Net.Search.MultiTermQuery.GetTotalNumberOfTerms"]