Class MultiMatchQueryDescriptor<T>
A match query across multiple fields.
Inheritance
MultiMatchQueryDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
[DataContract]
public class MultiMatchQueryDescriptor<T> : QueryDescriptorBase<MultiMatchQueryDescriptor<T>, IMultiMatchQuery>, IDescriptor, IMultiMatchQuery, IQuery where T : class
Type Parameters
Properties
|
Edit this page
View Source
Conditionless
Whether the query is conditionless. A conditionless query is not serialized as part of the request
sent to OpenSearch.
Declaration
protected override bool Conditionless { get; }
Property Value
Overrides
Methods
|
Edit this page
View Source
Analyzer(string)
The analyzer name used to analyze the query
Declaration
public MultiMatchQueryDescriptor<T> Analyzer(string analyzer)
Parameters
Type |
Name |
Description |
string |
analyzer |
|
Returns
|
Edit this page
View Source
AutoGenerateSynonymsPhraseQuery(bool?)
Declaration
public MultiMatchQueryDescriptor<T> AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true)
Parameters
Type |
Name |
Description |
bool? |
autoGenerateSynonymsPhraseQuery |
|
Returns
|
Edit this page
View Source
CutoffFrequency(double?)
A cutoff frequency that allows specifying an absolute or relative document frequency where
high frequency terms are moved into an optional subquery and are only scored if one of the low frequency
(below the cutoff) terms in the case of Or,
or all of the low frequency terms in the case of an And match.
Declaration
public MultiMatchQueryDescriptor<T> CutoffFrequency(double? cutoffFrequency)
Parameters
Type |
Name |
Description |
double? |
cutoffFrequency |
|
Returns
|
Edit this page
View Source
Fields(Fields)
The fields to perform the query against.
Declaration
public MultiMatchQueryDescriptor<T> Fields(Fields fields)
Parameters
Type |
Name |
Description |
Fields |
fields |
|
Returns
|
Edit this page
View Source
Fields(Func<FieldsDescriptor<T>, IPromise<Fields>>)
The fields to perform the query against.
Declaration
public MultiMatchQueryDescriptor<T> Fields(Func<FieldsDescriptor<T>, IPromise<Fields>> fields)
Parameters
Returns
|
Edit this page
View Source
Fuzziness(Fuzziness)
Declaration
public MultiMatchQueryDescriptor<T> Fuzziness(Fuzziness fuzziness)
Parameters
Returns
|
Edit this page
View Source
FuzzyRewrite(MultiTermQueryRewrite)
Declaration
public MultiMatchQueryDescriptor<T> FuzzyRewrite(MultiTermQueryRewrite rewrite)
Parameters
Returns
|
Edit this page
View Source
FuzzyTranspositions(bool?)
Sets whether transpositions are supported in fuzzy queries.
The default metric used by fuzzy queries to determine a match is the Damerau-Levenshtein
distance formula which supports transpositions. Setting transposition to false will
switch to classic Levenshtein distance.
If not set, Damerau-Levenshtein distance metric will be used.
Declaration
public MultiMatchQueryDescriptor<T> FuzzyTranspositions(bool? fuzzyTranpositions = true)
Parameters
Type |
Name |
Description |
bool? |
fuzzyTranpositions |
|
Returns
|
Edit this page
View Source
Lenient(bool?)
If set to true
will cause format based failures (like providing text to a numeric field)
to be ignored
Declaration
public MultiMatchQueryDescriptor<T> Lenient(bool? lenient = true)
Parameters
Type |
Name |
Description |
bool? |
lenient |
|
Returns
|
Edit this page
View Source
MaxExpansions(int?)
Controls the number of terms fuzzy queries will expand to. Defaults to 50
Declaration
public MultiMatchQueryDescriptor<T> MaxExpansions(int? maxExpansions)
Parameters
Type |
Name |
Description |
int? |
maxExpansions |
|
Returns
|
Edit this page
View Source
MinimumShouldMatch(MinimumShouldMatch)
A value controlling how many "should" clauses in the resulting boolean query should match.
It can be an absolute value, a percentage or a combination of both.
Declaration
public MultiMatchQueryDescriptor<T> MinimumShouldMatch(MinimumShouldMatch minimumShouldMatch)
Parameters
Returns
|
Edit this page
View Source
Operator(Operator?)
The operator used if no explicit operator is specified.
The default operator is Or
Declaration
public MultiMatchQueryDescriptor<T> Operator(Operator? op)
Parameters
Returns
|
Edit this page
View Source
PrefixLength(int?)
Set the prefix length for fuzzy queries. Default is 0
.
Declaration
public MultiMatchQueryDescriptor<T> PrefixLength(int? prefixLength)
Parameters
Type |
Name |
Description |
int? |
prefixLength |
|
Returns
|
Edit this page
View Source
Query(string)
Declaration
public MultiMatchQueryDescriptor<T> Query(string query)
Parameters
Type |
Name |
Description |
string |
query |
|
Returns
|
Edit this page
View Source
Slop(int?)
How far apart terms are allowed to be while still considering the document to be a match.
Declaration
public MultiMatchQueryDescriptor<T> Slop(int? slop)
Parameters
Type |
Name |
Description |
int? |
slop |
|
Returns
|
Edit this page
View Source
TieBreaker(double?)
Used to influence how the score is calculated for BestFields. If specified,
score is calculated using
Declaration
public MultiMatchQueryDescriptor<T> TieBreaker(double? tieBreaker)
Parameters
Type |
Name |
Description |
double? |
tieBreaker |
|
Returns
|
Edit this page
View Source
Type(TextQueryType?)
How the fields should be combined to build the text query.
Default is BestFields
Declaration
public MultiMatchQueryDescriptor<T> Type(TextQueryType? type)
Parameters
Returns
|
Edit this page
View Source
UseDisMax(bool?)
Declaration
public MultiMatchQueryDescriptor<T> UseDisMax(bool? useDisMax = true)
Parameters
Type |
Name |
Description |
bool? |
useDisMax |
|
Returns
|
Edit this page
View Source
ZeroTermsQuery(ZeroTermsQuery?)
If the analyzer used removes all tokens in a query like a stop filter does, the default behavior is
to match no documents at all. In order to change that, ZeroTermsQuery can be used,
which accepts None (default) and All
which corresponds to a match_all query.
Declaration
public MultiMatchQueryDescriptor<T> ZeroTermsQuery(ZeroTermsQuery? zeroTermsQuery)
Parameters
Returns
Implements
Extension Methods