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
MultiTermQuery.TopTermsScoringBooleanQueryRewrite
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public sealed class MultiTermQuery.TopTermsScoringBooleanQueryRewrite : TopTermsRewrite<BooleanQuery>
Constructors
TopTermsScoringBooleanQueryRewrite(int)
Create a MultiTermQuery.TopTermsScoringBooleanQueryRewrite for
at most size
terms.
size
, then it will be used instead.
Declaration
public TopTermsScoringBooleanQueryRewrite(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size |
See Also
Properties
MaxSize
Return the maximum size of the priority queue (for boolean rewrites this is MaxClauseCount).
Declaration
protected override int MaxSize { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
See Also
Methods
AddClause(BooleanQuery, Term, int, float, TermContext)
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.Declaration
protected override void AddClause(BooleanQuery topLevel, Term term, int docCount, float boost, TermContext states)
Parameters
Type | Name | Description |
---|---|---|
BooleanQuery | topLevel | |
Term | term | |
int | docCount | |
float | boost | |
TermContext | states |
Overrides
See Also
GetTopLevelQuery()
Return a suitable top-level Query for holding all expanded terms.
Declaration
protected override BooleanQuery GetTopLevelQuery()
Returns
Type | Description |
---|---|
BooleanQuery |