Search Results for

    Show / Hide Table of Contents

    Class MatchQueryDescriptor<T>

    A match query for a single field

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

    MatchQueryType

    Declaration
    protected virtual string MatchQueryType { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    Analyzer(string)

    The analyzer name used to analyze the query

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

    AutoGenerateSynonymsPhraseQuery(bool?)

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

    Fuzziness(Fuzziness)

    Allows fuzzy matching based on the type of field being queried.

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

    MaxExpansions(int?)

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

    Declaration
    public MatchQueryDescriptor<T> MaxExpansions(int? maxExpansions)
    Parameters
    Type Name Description
    int? maxExpansions
    Returns
    Type Description
    MatchQueryDescriptor<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 MatchQueryDescriptor<T> MinimumShouldMatch(MinimumShouldMatch minimumShouldMatch)
    Parameters
    Type Name Description
    MinimumShouldMatch minimumShouldMatch
    Returns
    Type Description
    MatchQueryDescriptor<T>
    | Edit this page View Source

    Operator(Operator?)

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

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

    PrefixLength(int?)

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

    Declaration
    public MatchQueryDescriptor<T> PrefixLength(int? prefixLength)
    Parameters
    Type Name Description
    int? prefixLength
    Returns
    Type Description
    MatchQueryDescriptor<T>
    | Edit this page View Source

    Query(string)

    The query to execute

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

    ZeroTermsQuery(ZeroTermsQuery?)

    If the analyzer used removes all tokens in a query like a stop filter does, the default behavior is to match no documents at all. In order to change that, ZeroTermsQuery can be used, which accepts None (default) and All which corresponds to a match_all query.

    Declaration
    public MatchQueryDescriptor<T> ZeroTermsQuery(ZeroTermsQuery? zeroTermsQuery)
    Parameters
    Type Name Description
    ZeroTermsQuery? zeroTermsQuery
    Returns
    Type Description
    MatchQueryDescriptor<T>

    Implements

    IDescriptor
    IMatchQuery
    IFieldNameQuery
    IQuery

    Extension Methods

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