Class MultiTermQuery.TopTermsScoringBooleanQueryRewrite
A rewrite method that first translates each term into SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count. It is the default rewrite method for FuzzyQuery.
Inheritance
System.Object
MultiTermQuery.TopTermsScoringBooleanQueryRewrite
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public sealed class TopTermsScoringBooleanQueryRewrite : TopTermsRewrite<BooleanQuery>, ITopTermsRewrite
Constructors
| Improve this Doc View SourceTopTermsScoringBooleanQueryRewrite(Int32)
Create a MultiTermQuery.TopTermsScoringBooleanQueryRewrite for
at most size
terms.
NOTE: if MaxClauseCount is smaller than
size
, then it will be used instead.
Declaration
public TopTermsScoringBooleanQueryRewrite(int size)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | size |
Properties
| Improve this Doc View SourceMaxSize
Declaration
protected override int MaxSize { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Lucene.Net.Search.TopTermsRewrite<Lucene.Net.Search.BooleanQuery>.MaxSize
Methods
| Improve this Doc View SourceAddClause(BooleanQuery, Term, Int32, Single, TermContext)
Declaration
protected override void AddClause(BooleanQuery topLevel, Term term, int docCount, float boost, TermContext states)
Parameters
Type | Name | Description |
---|---|---|
BooleanQuery | topLevel | |
Term | term | |
System.Int32 | docCount | |
System.Single | boost | |
TermContext | states |
Overrides
Lucene.Net.Search.TermCollectingRewrite<Lucene.Net.Search.BooleanQuery>.AddClause(Lucene.Net.Search.BooleanQuery, Lucene.Net.Index.Term, System.Int32, System.Single, Lucene.Net.Index.TermContext)
|
Improve this Doc
View Source
GetTopLevelQuery()
Declaration
protected override BooleanQuery GetTopLevelQuery()
Returns
Type | Description |
---|---|
BooleanQuery |
Overrides
Lucene.Net.Search.TermCollectingRewrite<Lucene.Net.Search.BooleanQuery>.GetTopLevelQuery()