Search Results for

    Show / Hide Table of Contents

    Class MultiMatchQueryDescriptor<T>

    A match query across multiple fields.

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

    Methods

    | Edit this page View Source

    Analyzer(string)

    The analyzer name used to analyze the query

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

    AutoGenerateSynonymsPhraseQuery(bool?)

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

    CutoffFrequency(double?)

    A cutoff frequency that allows specifying an absolute or relative document frequency where high frequency terms are moved into an optional subquery and are only scored if one of the low frequency (below the cutoff) terms in the case of Or, or all of the low frequency terms in the case of an And match.

    Declaration
    public MultiMatchQueryDescriptor<T> CutoffFrequency(double? cutoffFrequency)
    Parameters
    Type Name Description
    double? cutoffFrequency
    Returns
    Type Description
    MultiMatchQueryDescriptor<T>
    | Edit this page View Source

    Fields(Fields)

    The fields to perform the query against.

    Declaration
    public MultiMatchQueryDescriptor<T> Fields(Fields fields)
    Parameters
    Type Name Description
    Fields fields
    Returns
    Type Description
    MultiMatchQueryDescriptor<T>
    | Edit this page View Source

    Fields(Func<FieldsDescriptor<T>, IPromise<Fields>>)

    The fields to perform the query against.

    Declaration
    public MultiMatchQueryDescriptor<T> Fields(Func<FieldsDescriptor<T>, IPromise<Fields>> fields)
    Parameters
    Type Name Description
    Func<FieldsDescriptor<T>, IPromise<Fields>> fields
    Returns
    Type Description
    MultiMatchQueryDescriptor<T>
    | Edit this page View Source

    Fuzziness(Fuzziness)

    Allows fuzzy matching based on the type of field being queried. Cannot be used with the CrossFields, Phrase or PhrasePrefix types.

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

    MaxExpansions(int?)

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

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

    Operator(Operator?)

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

    Declaration
    public MultiMatchQueryDescriptor<T> Operator(Operator? op)
    Parameters
    Type Name Description
    Operator? op
    Returns
    Type Description
    MultiMatchQueryDescriptor<T>
    Remarks

    BestFields and MostFields types are field-centric ; they generate a match query per field. This means that Operator and MinimumShouldMatch are applied to each field individually, which is probably not what you want. Consider using CrossFields.

    | Edit this page View Source

    PrefixLength(int?)

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

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

    Query(string)

    The query to execute

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

    Slop(int?)

    How far apart terms are allowed to be while still considering the document to be a match.

    Declaration
    public MultiMatchQueryDescriptor<T> Slop(int? slop)
    Parameters
    Type Name Description
    int? slop
    Returns
    Type Description
    MultiMatchQueryDescriptor<T>
    | Edit this page View Source

    TieBreaker(double?)

    Used to influence how the score is calculated for BestFields. If specified, score is calculated using

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

    Type(TextQueryType?)

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

    Declaration
    public MultiMatchQueryDescriptor<T> Type(TextQueryType? type)
    Parameters
    Type Name Description
    TextQueryType? type
    Returns
    Type Description
    MultiMatchQueryDescriptor<T>
    | Edit this page View Source

    UseDisMax(bool?)

    By default, a IMultiMatchQuery generates a match clause per field, then wraps them in a IDisMaxQuery. By setting UseDisMax to false, they will be wrapped in a IBoolQuery instead.

    Declaration
    public MultiMatchQueryDescriptor<T> UseDisMax(bool? useDisMax = true)
    Parameters
    Type Name Description
    bool? useDisMax
    Returns
    Type Description
    MultiMatchQueryDescriptor<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 MultiMatchQueryDescriptor<T> ZeroTermsQuery(ZeroTermsQuery? zeroTermsQuery)
    Parameters
    Type Name Description
    ZeroTermsQuery? zeroTermsQuery
    Returns
    Type Description
    MultiMatchQueryDescriptor<T>

    Implements

    IDescriptor
    IMultiMatchQuery
    IQuery

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • Conditionless
    • Methods
      • Analyzer(string)
      • AutoGenerateSynonymsPhraseQuery(bool?)
      • CutoffFrequency(double?)
      • Fields(Fields)
      • Fields(Func<FieldsDescriptor<T>, IPromise<Fields>>)
      • Fuzziness(Fuzziness)
      • FuzzyRewrite(MultiTermQueryRewrite)
      • FuzzyTranspositions(bool?)
      • Lenient(bool?)
      • MaxExpansions(int?)
      • MinimumShouldMatch(MinimumShouldMatch)
      • Operator(Operator?)
      • PrefixLength(int?)
      • Query(string)
      • Slop(int?)
      • TieBreaker(double?)
      • Type(TextQueryType?)
      • UseDisMax(bool?)
      • ZeroTermsQuery(ZeroTermsQuery?)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX