Search Results for

    Show / Hide Table of Contents

    Class MatchBoolPrefixQueryDescriptor<T>

    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.

    Inheritance
    object
    DescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>
    QueryDescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>
    FieldNameQueryDescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery, T>
    MatchBoolPrefixQueryDescriptor<T>
    Implements
    IDescriptor
    IMatchBoolPrefixQuery
    IFieldNameQuery
    IQuery
    Inherited Members
    FieldNameQueryDescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery, T>.Field(Field)
    FieldNameQueryDescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery, T>.Field<TValue>(Expression<Func<T, TValue>>)
    QueryDescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>.Conditionless
    QueryDescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>.Name(string)
    QueryDescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>.Boost(double?)
    QueryDescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>.Verbatim(bool)
    QueryDescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>.Strict(bool)
    DescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>.Self
    DescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>.Assign<TValue>(TValue, Action<IMatchBoolPrefixQuery, 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 MatchBoolPrefixQueryDescriptor<T> : FieldNameQueryDescriptorBase<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery, T>, IDescriptor, IMatchBoolPrefixQuery, IFieldNameQuery, 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<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>.Conditionless

    Methods

    | Edit this page View Source

    Analyzer(string)

    The analyzer to use for the query

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

    Fuzziness(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
    public MatchBoolPrefixQueryDescriptor<T> Fuzziness(Fuzziness fuzziness)
    Parameters
    Type Name Description
    Fuzziness fuzziness
    Returns
    Type Description
    MatchBoolPrefixQueryDescriptor<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). Applies only to the term sub queries constructed, and not the prefix query for the final term.

    Declaration
    public MatchBoolPrefixQueryDescriptor<T> FuzzyRewrite(MultiTermQueryRewrite rewrite)
    Parameters
    Type Name Description
    MultiTermQueryRewrite rewrite
    Returns
    Type Description
    MatchBoolPrefixQueryDescriptor<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. Applies only to the term sub queries constructed, and not the prefix query for the final term.
    Declaration
    public MatchBoolPrefixQueryDescriptor<T> FuzzyTranspositions(bool? fuzzyTranspositions = true)
    Parameters
    Type Name Description
    bool? fuzzyTranspositions
    Returns
    Type Description
    MatchBoolPrefixQueryDescriptor<T>
    | Edit this page View Source

    MaxExpansions(int?)

    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
    public MatchBoolPrefixQueryDescriptor<T> MaxExpansions(int? maxExpansions)
    Parameters
    Type Name Description
    int? maxExpansions
    Returns
    Type Description
    MatchBoolPrefixQueryDescriptor<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. Applies to the bool query constructed.

    Declaration
    public MatchBoolPrefixQueryDescriptor<T> MinimumShouldMatch(MinimumShouldMatch minimumShouldMatch)
    Parameters
    Type Name Description
    MinimumShouldMatch minimumShouldMatch
    Returns
    Type Description
    MatchBoolPrefixQueryDescriptor<T>
    | Edit this page View Source

    Operator(Operator?)

    The operator used if no explicit operator is specified. The default operator is Or. Applies to the bool query constructed.

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

    PrefixLength(int?)

    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
    public MatchBoolPrefixQueryDescriptor<T> PrefixLength(int? prefixLength)
    Parameters
    Type Name Description
    int? prefixLength
    Returns
    Type Description
    MatchBoolPrefixQueryDescriptor<T>
    | Edit this page View Source

    Query(string)

    The query

    Declaration
    public MatchBoolPrefixQueryDescriptor<T> Query(string query)
    Parameters
    Type Name Description
    string query
    Returns
    Type Description
    MatchBoolPrefixQueryDescriptor<T>

    Implements

    IDescriptor
    IMatchBoolPrefixQuery
    IFieldNameQuery
    IQuery

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • Conditionless
    • Methods
      • Analyzer(string)
      • Fuzziness(Fuzziness)
      • FuzzyRewrite(MultiTermQueryRewrite)
      • FuzzyTranspositions(bool?)
      • MaxExpansions(int?)
      • MinimumShouldMatch(MinimumShouldMatch)
      • Operator(Operator?)
      • PrefixLength(int?)
      • Query(string)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX