Search Results for

    Show / Hide Table of Contents

    Class SimpleQueryStringQueryDescriptor<T>

    A query that uses the SimpleQueryParser to parse its context. Unlike the regular IQueryStringQuery, the ISimpleQueryStringQuery query will never throw an exception, and discards invalid parts of the query.

    Inheritance
    object
    DescriptorBase<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>
    QueryDescriptorBase<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>
    SimpleQueryStringQueryDescriptor<T>
    Implements
    IDescriptor
    ISimpleQueryStringQuery
    IQuery
    Inherited Members
    QueryDescriptorBase<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>.Conditionless
    QueryDescriptorBase<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>.Name(string)
    QueryDescriptorBase<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>.Boost(double?)
    QueryDescriptorBase<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>.Verbatim(bool)
    QueryDescriptorBase<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>.Strict(bool)
    DescriptorBase<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>.Self
    DescriptorBase<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>.Assign<TValue>(TValue, Action<ISimpleQueryStringQuery, 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
    public class SimpleQueryStringQueryDescriptor<T> : QueryDescriptorBase<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>, IDescriptor, ISimpleQueryStringQuery, 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<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>.Conditionless

    Methods

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

    Analyzer(string)

    The analyzer name used to analyze the query

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

    AutoGenerateSynonymsPhraseQuery(bool?)

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

    DefaultOperator(Operator?)

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

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

    Flags(SimpleQueryStringFlags?)

    Flags specifying which features to enable. Defaults to All.

    Declaration
    public SimpleQueryStringQueryDescriptor<T> Flags(SimpleQueryStringFlags? flags)
    Parameters
    Type Name Description
    SimpleQueryStringFlags? flags
    Returns
    Type Description
    SimpleQueryStringQueryDescriptor<T>
    | Edit this page View Source

    FuzzyMaxExpansions(int?)

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

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

    FuzzyPrefixLength(int?)

    Set the prefix length for fuzzy queries. Default is 0

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

    FuzzyTranspositions(bool?)

    Sets whether transpositions are supported in fuzzy queries. Default is true.

    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 SimpleQueryStringQueryDescriptor<T> FuzzyTranspositions(bool? fuzzyTranspositions = true)
    Parameters
    Type Name Description
    bool? fuzzyTranspositions
    Returns
    Type Description
    SimpleQueryStringQueryDescriptor<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 SimpleQueryStringQueryDescriptor<T> Lenient(bool? lenient = true)
    Parameters
    Type Name Description
    bool? lenient
    Returns
    Type Description
    SimpleQueryStringQueryDescriptor<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 SimpleQueryStringQueryDescriptor<T> MinimumShouldMatch(MinimumShouldMatch minimumShouldMatch)
    Parameters
    Type Name Description
    MinimumShouldMatch minimumShouldMatch
    Returns
    Type Description
    SimpleQueryStringQueryDescriptor<T>
    | Edit this page View Source

    Query(string)

    The query to be parsed

    Declaration
    public SimpleQueryStringQueryDescriptor<T> Query(string query)
    Parameters
    Type Name Description
    string query
    Returns
    Type Description
    SimpleQueryStringQueryDescriptor<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 SimpleQueryStringQueryDescriptor<T> QuoteFieldSuffix(string quoteFieldSuffix)
    Parameters
    Type Name Description
    string quoteFieldSuffix
    Returns
    Type Description
    SimpleQueryStringQueryDescriptor<T>

    Implements

    IDescriptor
    ISimpleQueryStringQuery
    IQuery

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • Conditionless
    • Methods
      • AnalyzeWildcard(bool?)
      • Analyzer(string)
      • AutoGenerateSynonymsPhraseQuery(bool?)
      • DefaultOperator(Operator?)
      • Fields(Fields)
      • Fields(Func<FieldsDescriptor<T>, IPromise<Fields>>)
      • Flags(SimpleQueryStringFlags?)
      • FuzzyMaxExpansions(int?)
      • FuzzyPrefixLength(int?)
      • FuzzyTranspositions(bool?)
      • Lenient(bool?)
      • MinimumShouldMatch(MinimumShouldMatch)
      • Query(string)
      • QuoteFieldSuffix(string)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX