Interface IMatchBoolPrefixQuery
A match_bool_prefix query analyzes its input and constructs a bool query from the terms. Each term except the last is used in a term query. The last term is used in a prefix query.
Inherited Members
Namespace: OpenSearch .Client
Assembly: OpenSearch.Client.dll
Syntax
public interface IMatchBoolPrefixQuery : IFieldNameQuery, IQuery
Properties
| Edit this page View SourceAnalyzer
The analyzer to use for the query
Declaration
[DataMember(Name = "analyzer")]
string Analyzer { get; set; }
Property Value
Type | Description |
---|---|
string |
Fuzziness
Allows fuzzy matching based on the type of field being queried. Applies only to the term sub queries constructed, and not the prefix query for the final term.
Declaration
[DataMember(Name = "fuzziness")]
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 Top
Declaration
[DataMember(Name = "fuzzy_rewrite")]
MultiTermQueryRewrite FuzzyRewrite { get; set; }
Property Value
Type | Description |
---|---|
Multi |
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. Applies only to the term sub queries constructed, and not the prefix query for the final term.Declaration
[DataMember(Name = "fuzzy_transpositions")]
bool? FuzzyTranspositions { get; set; }
Property Value
Type | Description |
---|---|
bool? |
MaxExpansions
Controls the number of terms fuzzy queries will expand to. Defaults to 50
.
Applies only to the term sub queries constructed, and not the prefix query for the final term.
Declaration
[DataMember(Name = "max_expansions")]
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. Applies to the bool query constructed.
Declaration
[DataMember(Name = "minimum_should_match")]
MinimumShouldMatch MinimumShouldMatch { get; set; }
Property Value
Type | Description |
---|---|
Minimum |
Operator
The operator used if no explicit operator is specified. The default operator is Or. Applies to the bool query constructed.
Declaration
[DataMember(Name = "operator")]
Operator? Operator { get; set; }
Property Value
Type | Description |
---|---|
Operator? |
PrefixLength
Set the prefix length for fuzzy queries. Default is 0
.
Applies only to the term sub queries constructed, and not the prefix query for the final term.
Declaration
[DataMember(Name = "prefix_length")]
int? PrefixLength { get; set; }
Property Value
Type | Description |
---|---|
int? |
Query
The query
Declaration
[DataMember(Name = "query")]
string Query { get; set; }
Property Value
Type | Description |
---|---|
string |