Class MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
A rewrite method that first translates each term into SHOULD clause in a BooleanQuery, but the scores are only computed as the boost.
This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count.Inheritance
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public sealed class MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite : TopTermsRewrite<BooleanQuery>
Constructors
TopTermsBoostOnlyBooleanQueryRewrite(int)
Create a MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite for
at most size
terms.
size
, then it will be used instead.
Declaration
public TopTermsBoostOnlyBooleanQueryRewrite(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, but the scores are only computed as the boost.
This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count.Declaration
protected override void AddClause(BooleanQuery topLevel, Term term, int docFreq, float boost, TermContext states)
Parameters
Type | Name | Description |
---|---|---|
BooleanQuery | topLevel | |
Term | term | |
int | docFreq | |
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 |