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
System.Object
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
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 TopTermsBoostOnlyBooleanQueryRewrite : TopTermsRewrite<BooleanQuery>, ITopTermsRewrite
Constructors
| Improve this Doc View SourceTopTermsBoostOnlyBooleanQueryRewrite(Int32)
Create a MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite for
at most size terms.
NOTE: if MaxClauseCount is smaller than
size, then it will be used instead.
Declaration
public TopTermsBoostOnlyBooleanQueryRewrite(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 docFreq, float boost, TermContext states)
Parameters
| Type | Name | Description |
|---|---|---|
| BooleanQuery | topLevel | |
| Term | term | |
| System.Int32 | docFreq | |
| 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()