Interface IQueryStringQuery
A query that uses a query parser in order to parse its content
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public interface IQueryStringQuery : IQuery
Properties
| Edit this page View SourceAllowLeadingWildcard
When set, *
or ?
are allowed as the first character. Defaults to true
.
Declaration
[DataMember(Name = "allow_leading_wildcard")]
bool? AllowLeadingWildcard { get; set; }
Property Value
Type | Description |
---|---|
bool? |
AnalyzeWildcard
By default, wildcards terms in a query are not analyzed.
By setting this value to true
, a best effort will be made to analyze those as well.
Declaration
[DataMember(Name = "analyze_wildcard")]
bool? AnalyzeWildcard { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Analyzer
The analyzer name used to analyze the query
Declaration
[DataMember(Name = "analyzer")]
string Analyzer { get; set; }
Property Value
Type | Description |
---|---|
string |
AutoGenerateSynonymsPhraseQuery
Declaration
[DataMember(Name = "auto_generate_synonyms_phrase_query")]
bool? AutoGenerateSynonymsPhraseQuery { get; set; }
Property Value
Type | Description |
---|---|
bool? |
DefaultField
The default field for query terms if no prefix field is specified. Defaults to the index.query.default_field index settings, which in turn defaults to *.
- extracts all fields in the mapping that are eligible to term queries and filters the metadata fields. All extracted fields are then combined to build a query when no prefix field is provided.
Declaration
[DataMember(Name = "default_field")]
Field DefaultField { get; set; }
Property Value
Type | Description |
---|---|
Field |
DefaultOperator
The default operator used if no explicit operator is specified. The default operator is Or
Declaration
[DataMember(Name = "default_operator")]
Operator? DefaultOperator { get; set; }
Property Value
Type | Description |
---|---|
Operator? |
EnablePositionIncrements
Set to true
to enable position increments in result queries. Defaults to true
.
Declaration
[DataMember(Name = "enable_position_increments")]
bool? EnablePositionIncrements { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Escape
Enables escaping of the query
Declaration
[DataMember(Name = "escape")]
bool? Escape { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Fields
The fields to perform the parsed query against.
Defaults to the index.query.default_field
index settings, which in turn defaults to .
extracts all fields in the mapping that are eligible to term queries and filters the metadata fields.
Declaration
[DataMember(Name = "fields")]
Fields Fields { get; set; }
Property Value
Type | Description |
---|---|
Fields |
Fuzziness
Set the fuzziness for fuzzy queries. Defaults to Auto
Declaration
[DataMember(Name = "fuzziness")]
Fuzziness Fuzziness { get; set; }
Property Value
Type | Description |
---|---|
Fuzziness |
FuzzyMaxExpansions
Controls the number of terms fuzzy queries will expand to. Defaults to 50
Declaration
[DataMember(Name = "fuzzy_max_expansions")]
int? FuzzyMaxExpansions { get; set; }
Property Value
Type | Description |
---|---|
int? |
FuzzyPrefixLength
Set the prefix length for fuzzy queries. Default is 0
.
Declaration
[DataMember(Name = "fuzzy_prefix_length")]
int? FuzzyPrefixLength { get; set; }
Property Value
Type | Description |
---|---|
int? |
FuzzyRewrite
Controls how the query is rewritten if Fuzziness is set. In this scenario, the default is TopTermsBlendedFreqs(int).
Declaration
[DataMember(Name = "fuzzy_rewrite")]
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
[DataMember(Name = "fuzzy_transpositions")]
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
[DataMember(Name = "lenient")]
bool? Lenient { get; set; }
Property Value
Type | Description |
---|---|
bool? |
MaximumDeterminizedStates
Limit on how many automaton states regexp queries are allowed to create.
This protects against too-difficult (e.g. exponentially hard) regexps.
Defaults to 10000
.
Declaration
[DataMember(Name = "max_determinized_states")]
int? MaximumDeterminizedStates { 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
[DataMember(Name = "minimum_should_match")]
MinimumShouldMatch MinimumShouldMatch { get; set; }
Property Value
Type | Description |
---|---|
MinimumShouldMatch |
PhraseSlop
Sets the default slop for phrases. If zero, then exact phrase matches are required.
Default value is 0
.
Declaration
[DataMember(Name = "phrase_slop")]
double? PhraseSlop { get; set; }
Property Value
Type | Description |
---|---|
double? |
Query
The query to be parsed
Declaration
[DataMember(Name = "query")]
string Query { get; set; }
Property Value
Type | Description |
---|---|
string |
QuoteAnalyzer
The name of the analyzer that is used to analyze quoted phrases in the query string. For those parts, it overrides other analyzers that are set using the analyzer parameter or the search_quote_analyzer setting.
Declaration
[DataMember(Name = "quote_analyzer")]
string QuoteAnalyzer { get; set; }
Property Value
Type | Description |
---|---|
string |
QuoteFieldSuffix
A suffix to append to fields for quoted parts of the query string. This allows to use a field that has a different analysis chain for exact matching.
Declaration
[DataMember(Name = "quote_field_suffix")]
string QuoteFieldSuffix { get; set; }
Property Value
Type | Description |
---|---|
string |
Rewrite
Controls how a multi term query such as a wildcard or prefix query, is rewritten.
Declaration
[DataMember(Name = "rewrite")]
MultiTermQueryRewrite Rewrite { get; set; }
Property Value
Type | Description |
---|---|
MultiTermQueryRewrite |
TieBreaker
The disjunction max tie breaker for multi fields. Defaults to 0
Declaration
[DataMember(Name = "tie_breaker")]
double? TieBreaker { get; set; }
Property Value
Type | Description |
---|---|
double? |
TimeZone
Time Zone to be applied to any range query related to dates.
Declaration
[DataMember(Name = "time_zone")]
string TimeZone { get; set; }
Property Value
Type | Description |
---|---|
string |
Type
How the fields should be combined to build the text query. Default is BestFields
Declaration
[DataMember(Name = "type")]
TextQueryType? Type { get; set; }
Property Value
Type | Description |
---|---|
TextQueryType? |