Search Results for

    Show / Hide Table of Contents

    Class NeuralQueryDescriptor<T>

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

    Methods

    | Edit this page View Source

    ExpandNestedDocs(bool?)

    When true, retrieves scores for all nested field documents within each parent document. Used with nested queries.

    Declaration
    public NeuralQueryDescriptor<T> ExpandNestedDocs(bool? expandNestedDocs = true)
    Parameters
    Type Name Description
    bool? expandNestedDocs
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    Filter(Func<QueryContainerDescriptor<T>, QueryContainer>)

    A query used to reduce the number of documents considered.

    Declaration
    public NeuralQueryDescriptor<T> Filter(Func<QueryContainerDescriptor<T>, QueryContainer> filterSelector)
    Parameters
    Type Name Description
    Func<QueryContainerDescriptor<T>, QueryContainer> filterSelector
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    K(int?)

    The number of results the k-NN search returns. Only one of K, MaxDistance, or MinScore can be specified; if none is set, the server default is k = 10.

    Declaration
    public NeuralQueryDescriptor<T> K(int? k)
    Parameters
    Type Name Description
    int? k
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    MaxDistance(float?)

    The maximum physical vector space distance required in order for a neighbor to be considered a hit (radial search). Only one of K, MaxDistance, or MinScore can be specified.

    Declaration
    public NeuralQueryDescriptor<T> MaxDistance(float? maxDistance)
    Parameters
    Type Name Description
    float? maxDistance
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    MethodParameters(Func<FluentDictionary<string, object>, FluentDictionary<string, object>>)

    Additional engine-specific parameters that control the approximate k-NN search at query time, such as ef_search (HNSW) or nprobes (IVF).

    Declaration
    public NeuralQueryDescriptor<T> MethodParameters(Func<FluentDictionary<string, object>, FluentDictionary<string, object>> selector)
    Parameters
    Type Name Description
    Func<FluentDictionary<string, object>, FluentDictionary<string, object>> selector
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    MinScore(float?)

    The minimum similarity score required in order for a neighbor to be considered a hit (radial search). Only one of K, MaxDistance, or MinScore can be specified.

    Declaration
    public NeuralQueryDescriptor<T> MinScore(float? minScore)
    Parameters
    Type Name Description
    float? minScore
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    ModelId(string)

    The ID of the model that will be used in the embedding interface. The model must be indexed in OpenSearch before it can be used in Neural Search.

    Declaration
    public NeuralQueryDescriptor<T> ModelId(string modelId)
    Parameters
    Type Name Description
    string modelId
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    QueryImage(string)

    A Base64-encoded string that corresponds to the query image from which to generate vector embeddings. You must specify at least one of QueryText or QueryImage.

    Declaration
    public NeuralQueryDescriptor<T> QueryImage(string queryImage)
    Parameters
    Type Name Description
    string queryImage
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    QueryText(string)

    The query text from which to produce queries. You must specify at least one of QueryText or QueryImage.

    Declaration
    public NeuralQueryDescriptor<T> QueryText(string queryText)
    Parameters
    Type Name Description
    string queryText
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    QueryTokens(Func<FluentDictionary<string, float>, FluentDictionary<string, float>>)

    A raw sparse vector, expressed as tokens and their weights. Used as an alternative to QueryText for direct vector input.

    Declaration
    public NeuralQueryDescriptor<T> QueryTokens(Func<FluentDictionary<string, float>, FluentDictionary<string, float>> selector)
    Parameters
    Type Name Description
    Func<FluentDictionary<string, float>, FluentDictionary<string, float>> selector
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    Rescore(Func<KnnQueryRescoreContextDescriptor, IKnnQueryRescoreContext>)

    Controls the rescoring of approximate k-NN search results using full-precision vectors. Pass a bool to enable or disable rescoring, or a KnnQueryRescoreContext to configure it.

    Declaration
    public NeuralQueryDescriptor<T> Rescore(Func<KnnQueryRescoreContextDescriptor, IKnnQueryRescoreContext> selector)
    Parameters
    Type Name Description
    Func<KnnQueryRescoreContextDescriptor, IKnnQueryRescoreContext> selector
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    Rescore(bool?)

    Controls the rescoring of approximate k-NN search results using full-precision vectors. Pass a bool to enable or disable rescoring, or a KnnQueryRescoreContext to configure it.

    Declaration
    public NeuralQueryDescriptor<T> Rescore(bool? enable = true)
    Parameters
    Type Name Description
    bool? enable
    Returns
    Type Description
    NeuralQueryDescriptor<T>
    | Edit this page View Source

    SemanticFieldSearchAnalyzer(string)

    An analyzer for tokenizing QueryText when using a sparse encoding model. Cannot be used together with ModelId.

    Declaration
    public NeuralQueryDescriptor<T> SemanticFieldSearchAnalyzer(string analyzer)
    Parameters
    Type Name Description
    string analyzer
    Returns
    Type Description
    NeuralQueryDescriptor<T>

    Implements

    IDescriptor
    INeuralQuery
    IFieldNameQuery
    IQuery

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX