Class MatchQuery
A match query for a single field
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public class MatchQuery : FieldNameQueryBase, IMatchQuery, IFieldNameQuery, IQuery
Properties
| Edit this page View SourceAnalyzer
The analyzer name used to analyze the query
Declaration
public string Analyzer { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
AutoGenerateSynonymsPhraseQuery
Declaration
public bool? AutoGenerateSynonymsPhraseQuery { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
Conditionless
Declaration
protected override bool Conditionless { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
| Edit this page View SourceFuzziness
Allows fuzzy matching based on the type of field being queried.
Declaration
public IFuzziness Fuzziness { get; set; }
Property Value
| Type | Description |
|---|---|
| IFuzziness |
FuzzyRewrite
Controls how the query is rewritten if Fuzziness is set. In this scenario, the default is TopTermsBlendedFreqs(int).
Declaration
public MultiTermQueryRewrite FuzzyRewrite { get; set; }
Property Value
| Type | Description |
|---|---|
| MultiTermQueryRewrite |
FuzzyTranspositions
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 bool? FuzzyTranspositions { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
Lenient
If set to true will cause format based failures (like providing text to a numeric field)
to be ignored
Declaration
public bool? Lenient { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
MaxExpansions
Controls the number of terms fuzzy queries will expand to. Defaults to 50
Declaration
public int? MaxExpansions { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
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 MinimumShouldMatch MinimumShouldMatch { get; set; }
Property Value
| Type | Description |
|---|---|
| MinimumShouldMatch |
Operator
The operator used if no explicit operator is specified. The default operator is Or
Declaration
public Operator? Operator { get; set; }
Property Value
| Type | Description |
|---|---|
| Operator? |
PrefixLength
Set the prefix length for fuzzy queries. Default is 0.
Declaration
public int? PrefixLength { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
Query
The query to execute
Declaration
public string Query { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
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 ZeroTermsQuery? ZeroTermsQuery { get; set; }
Property Value
| Type | Description |
|---|---|
| ZeroTermsQuery? |