Search Results for

    Show / Hide Table of Contents

    Class QueryStringQueryDescriptor<T>

    A query that uses a query parser in order to parse its content

    Inheritance
    object
    DescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>
    QueryDescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>
    QueryStringQueryDescriptor<T>
    Implements
    IDescriptor
    IQueryStringQuery
    IQuery
    Inherited Members
    QueryDescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>.Conditionless
    QueryDescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>.Name(string)
    QueryDescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>.Boost(double?)
    QueryDescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>.Verbatim(bool)
    QueryDescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>.Strict(bool)
    DescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>.Self
    DescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>.Assign<TValue>(TValue, Action<IQueryStringQuery, TValue>)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    [DataContract]
    public class QueryStringQueryDescriptor<T> : QueryDescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>, IDescriptor, IQueryStringQuery, IQuery where T : class
    Type Parameters
    Name Description
    T

    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
    Type Description
    bool
    Overrides
    QueryDescriptorBase<QueryStringQueryDescriptor<T>, IQueryStringQuery>.Conditionless

    Methods

    | Edit this page View Source

    AllowLeadingWildcard(bool?)

    When set, * or ? are allowed as the first character. Defaults to true.

    Declaration
    public QueryStringQueryDescriptor<T> AllowLeadingWildcard(bool? allowLeadingWildcard = true)
    Parameters
    Type Name Description
    bool? allowLeadingWildcard
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    AnalyzeWildcard(bool?)

    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
    public QueryStringQueryDescriptor<T> AnalyzeWildcard(bool? analyzeWildcard = true)
    Parameters
    Type Name Description
    bool? analyzeWildcard
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    Analyzer(string)

    The analyzer name used to analyze the query

    Declaration
    public QueryStringQueryDescriptor<T> Analyzer(string analyzer)
    Parameters
    Type Name Description
    string analyzer
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    AutoGenerateSynonymsPhraseQuery(bool?)

    Declaration
    public QueryStringQueryDescriptor<T> AutoGenerateSynonymsPhraseQuery(bool? autoGenerateSynonymsPhraseQuery = true)
    Parameters
    Type Name Description
    bool? autoGenerateSynonymsPhraseQuery
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    DefaultField(Field)

    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
    public QueryStringQueryDescriptor<T> DefaultField(Field field)
    Parameters
    Type Name Description
    Field field
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    DefaultField<TValue>(Expression<Func<T, TValue>>)

    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
    public QueryStringQueryDescriptor<T> DefaultField<TValue>(Expression<Func<T, TValue>> field)
    Parameters
    Type Name Description
    Expression<Func<T, TValue>> field
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    Type Parameters
    Name Description
    TValue
    | Edit this page View Source

    DefaultOperator(Operator?)

    The default operator used if no explicit operator is specified. The default operator is Or

    Declaration
    public QueryStringQueryDescriptor<T> DefaultOperator(Operator? op)
    Parameters
    Type Name Description
    Operator? op
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    EnablePositionIncrements(bool?)

    Set to true to enable position increments in result queries. Defaults to true.

    Declaration
    public QueryStringQueryDescriptor<T> EnablePositionIncrements(bool? enablePositionIncrements = true)
    Parameters
    Type Name Description
    bool? enablePositionIncrements
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    Escape(bool?)

    Enables escaping of the query

    Declaration
    public QueryStringQueryDescriptor<T> Escape(bool? escape = true)
    Parameters
    Type Name Description
    bool? escape
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    Fields(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
    public QueryStringQueryDescriptor<T> Fields(Fields fields)
    Parameters
    Type Name Description
    Fields fields
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    Fields(Func<FieldsDescriptor<T>, IPromise<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
    public QueryStringQueryDescriptor<T> Fields(Func<FieldsDescriptor<T>, IPromise<Fields>> fields)
    Parameters
    Type Name Description
    Func<FieldsDescriptor<T>, IPromise<Fields>> fields
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    Fuzziness(Fuzziness)

    Set the fuzziness for fuzzy queries. Defaults to Auto

    Declaration
    public QueryStringQueryDescriptor<T> Fuzziness(Fuzziness fuzziness)
    Parameters
    Type Name Description
    Fuzziness fuzziness
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    FuzzyMaxExpansions(int?)

    Controls the number of terms fuzzy queries will expand to. Defaults to 50

    Declaration
    public QueryStringQueryDescriptor<T> FuzzyMaxExpansions(int? fuzzyMaxExpansions)
    Parameters
    Type Name Description
    int? fuzzyMaxExpansions
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    FuzzyPrefixLength(int?)

    Set the prefix length for fuzzy queries. Default is 0.

    Declaration
    public QueryStringQueryDescriptor<T> FuzzyPrefixLength(int? fuzzyPrefixLength)
    Parameters
    Type Name Description
    int? fuzzyPrefixLength
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    FuzzyRewrite(MultiTermQueryRewrite)

    Controls how the query is rewritten if Fuzziness is set. In this scenario, the default is TopTermsBlendedFreqs(int).

    Declaration
    public QueryStringQueryDescriptor<T> FuzzyRewrite(MultiTermQueryRewrite rewrite)
    Parameters
    Type Name Description
    MultiTermQueryRewrite rewrite
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | 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 QueryStringQueryDescriptor<T> FuzzyTranspositions(bool? fuzzyTranspositions = true)
    Parameters
    Type Name Description
    bool? fuzzyTranspositions
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | 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 QueryStringQueryDescriptor<T> Lenient(bool? lenient = true)
    Parameters
    Type Name Description
    bool? lenient
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    MaximumDeterminizedStates(int?)

    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
    public QueryStringQueryDescriptor<T> MaximumDeterminizedStates(int? maxDeterminizedStates)
    Parameters
    Type Name Description
    int? maxDeterminizedStates
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | 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 QueryStringQueryDescriptor<T> MinimumShouldMatch(MinimumShouldMatch minimumShouldMatch)
    Parameters
    Type Name Description
    MinimumShouldMatch minimumShouldMatch
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    PhraseSlop(double?)

    Sets the default slop for phrases. If zero, then exact phrase matches are required. Default value is 0.

    Declaration
    public QueryStringQueryDescriptor<T> PhraseSlop(double? phraseSlop)
    Parameters
    Type Name Description
    double? phraseSlop
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    Query(string)

    The query to be parsed

    Declaration
    public QueryStringQueryDescriptor<T> Query(string query)
    Parameters
    Type Name Description
    string query
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    QuoteAnalyzer(string)

    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
    public QueryStringQueryDescriptor<T> QuoteAnalyzer(string analyzer)
    Parameters
    Type Name Description
    string analyzer
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    QuoteFieldSuffix(string)

    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
    public QueryStringQueryDescriptor<T> QuoteFieldSuffix(string quoteFieldSuffix)
    Parameters
    Type Name Description
    string quoteFieldSuffix
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    Rewrite(MultiTermQueryRewrite)

    Controls how a multi term query such as a wildcard or prefix query, is rewritten.

    Declaration
    public QueryStringQueryDescriptor<T> Rewrite(MultiTermQueryRewrite rewrite)
    Parameters
    Type Name Description
    MultiTermQueryRewrite rewrite
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    TieBreaker(double?)

    The disjunction max tie breaker for multi fields. Defaults to 0

    Declaration
    public QueryStringQueryDescriptor<T> TieBreaker(double? tieBreaker)
    Parameters
    Type Name Description
    double? tieBreaker
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    TimeZone(string)

    Time Zone to be applied to any range query related to dates.

    Declaration
    public QueryStringQueryDescriptor<T> TimeZone(string timezone)
    Parameters
    Type Name Description
    string timezone
    Returns
    Type Description
    QueryStringQueryDescriptor<T>
    | Edit this page View Source

    Type(TextQueryType?)

    How the fields should be combined to build the text query. Default is BestFields

    Declaration
    public QueryStringQueryDescriptor<T> Type(TextQueryType? type)
    Parameters
    Type Name Description
    TextQueryType? type
    Returns
    Type Description
    QueryStringQueryDescriptor<T>

    Implements

    IDescriptor
    IQueryStringQuery
    IQuery

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • Conditionless
    • Methods
      • AllowLeadingWildcard(bool?)
      • AnalyzeWildcard(bool?)
      • Analyzer(string)
      • AutoGenerateSynonymsPhraseQuery(bool?)
      • DefaultField(Field)
      • DefaultField<TValue>(Expression<Func<T, TValue>>)
      • DefaultOperator(Operator?)
      • EnablePositionIncrements(bool?)
      • Escape(bool?)
      • Fields(Fields)
      • Fields(Func<FieldsDescriptor<T>, IPromise<Fields>>)
      • Fuzziness(Fuzziness)
      • FuzzyMaxExpansions(int?)
      • FuzzyPrefixLength(int?)
      • FuzzyRewrite(MultiTermQueryRewrite)
      • FuzzyTranspositions(bool?)
      • Lenient(bool?)
      • MaximumDeterminizedStates(int?)
      • MinimumShouldMatch(MinimumShouldMatch)
      • PhraseSlop(double?)
      • Query(string)
      • QuoteAnalyzer(string)
      • QuoteFieldSuffix(string)
      • Rewrite(MultiTermQueryRewrite)
      • TieBreaker(double?)
      • TimeZone(string)
      • Type(TextQueryType?)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX