Search Results for

    Show / Hide Table of Contents

    Interface IKnnQuery

    An approximate k-NN query.

    Inherited Members
    IFieldNameQuery.Field
    IQuery.Boost
    IQuery.Conditionless
    IQuery.IsStrict
    IQuery.IsVerbatim
    IQuery.IsWritable
    IQuery.Name
    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    public interface IKnnQuery : IFieldNameQuery, IQuery

    Properties

    | Edit this page View Source

    ExpandNestedDocs

    Whether to expand and search over the nested documents of each matching parent document. Supported from OpenSearch 2.19.

    Declaration
    [DataMember(Name = "expand_nested_docs")]
    bool? ExpandNestedDocs { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    Filter

    The result restriction filter query.

    Declaration
    [DataMember(Name = "filter")]
    IQueryContainer Filter { get; set; }
    Property Value
    Type Description
    IQueryContainer
    | Edit this page View Source

    K

    The number of neighbors the search of each graph will return.

    Declaration
    [DataMember(Name = "k")]
    int? K { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    MaxDistance

    The maximum physical vector space distance required in order for a neighbor to be considered a hit.

    Declaration
    [DataMember(Name = "max_distance")]
    float? MaxDistance { get; set; }
    Property Value
    Type Description
    float?
    | Edit this page View Source

    MethodParameters

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

    Declaration
    [DataMember(Name = "method_parameters")]
    IDictionary<string, object> MethodParameters { get; set; }
    Property Value
    Type Description
    IDictionary<string, object>
    | Edit this page View Source

    MinScore

    The minimum similarity score required in order for a neighbor to be considered a hit.

    Declaration
    [DataMember(Name = "min_score")]
    float? MinScore { get; set; }
    Property Value
    Type Description
    float?
    | Edit this page View Source

    Rescore

    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. Supported from OpenSearch 2.17.

    Declaration
    [DataMember(Name = "rescore")]
    Union<bool, KnnQueryRescoreContext> Rescore { get; set; }
    Property Value
    Type Description
    Union<bool, KnnQueryRescoreContext>
    | Edit this page View Source

    Vector

    The vector to search for.

    Declaration
    [DataMember(Name = "vector")]
    float[] Vector { get; set; }
    Property Value
    Type Description
    float[]

    Extension Methods

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