Class MultiTermQueryRewrite
Controls how a multi term query such as a wildcard or prefix query, is rewritten.
Inheritance
MultiTermQueryRewrite
Assembly: OpenSearch.Client.dll
Syntax
public class MultiTermQueryRewrite : IEquatable<MultiTermQueryRewrite>
Properties
|
Edit this page
View Source
ConstantScore
A rewrite method that performs like constant_score_boolean when there are few matching terms and otherwise
visits all matching terms in sequence and marks documents for that term. Matching documents are assigned a
constant score equal to the query’s boost.
Declaration
public static MultiTermQueryRewrite ConstantScore { get; }
Property Value
|
Edit this page
View Source
ConstantScoreBoolean
Similar to scoring_boolean except scores are not computed. Instead, each matching document receives a constant
score equal to the query’s boost. This rewrite method will hit too many clauses failure if it exceeds the
boolean query limit (defaults to 1024).
Declaration
public static MultiTermQueryRewrite ConstantScoreBoolean { get; }
Property Value
|
Edit this page
View Source
Rewrite
The type of multi term rewrite to perform
Declaration
public RewriteMultiTerm Rewrite { get; }
Property Value
|
Edit this page
View Source
ScoringBoolean
A rewrite method that first translates each term into a should clause in a boolean query, and keeps the scores
as computed by the query. Note that typically such scores are meaningless to the user, and require non-trivial
CPU to compute. This rewrite method will hit too many
clauses failure if it exceeds the boolean query limit (defaults to 1024).
Declaration
public static MultiTermQueryRewrite ScoringBoolean { get; }
Property Value
|
Edit this page
View Source
Size
The size of the top scoring terms to use
Declaration
public int? Size { get; }
Property Value
Methods
|
Edit this page
View Source
Equals(MultiTermQueryRewrite)
Declaration
public bool Equals(MultiTermQueryRewrite other)
Parameters
Returns
|
Edit this page
View Source
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
|
Edit this page
View Source
TopTerms(int)
A rewrite method that first translates each term into should clause in boolean query, and keeps the scores
as computed by the query. This rewrite method only uses the top scoring terms so it will not overflow boolean
max clause count.
controls the size of the top scoring terms to use.
Declaration
public static MultiTermQueryRewrite TopTerms(int size)
Parameters
Type |
Name |
Description |
int |
size |
|
Returns
|
Edit this page
View Source
TopTermsBlendedFreqs(int)
A rewrite method that first translates each term into should clause in boolean query, but all term queries compute
scores as if they had the same frequency. In practice the frequency which is used is the maximum frequency of all
matching terms. This rewrite method only uses the top scoring terms so it will not overflow boolean max clause count.
controls the size of the top scoring terms to use.
Declaration
public static MultiTermQueryRewrite TopTermsBlendedFreqs(int size)
Parameters
Type |
Name |
Description |
int |
size |
|
Returns
|
Edit this page
View Source
TopTermsBoost(int)
A rewrite method that first translates each term into should clause in boolean query, 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.
controls the size of the top scoring terms to use.
Declaration
public static MultiTermQueryRewrite TopTermsBoost(int size)
Parameters
Type |
Name |
Description |
int |
size |
|
Returns
Operators
|
Edit this page
View Source
operator ==(MultiTermQueryRewrite, MultiTermQueryRewrite)
Declaration
public static bool operator ==(MultiTermQueryRewrite left, MultiTermQueryRewrite right)
Parameters
Returns
|
Edit this page
View Source
operator !=(MultiTermQueryRewrite, MultiTermQueryRewrite)
Declaration
public static bool operator !=(MultiTermQueryRewrite left, MultiTermQueryRewrite right)
Parameters
Returns
Implements
Extension Methods