Search Results for

    Show / Hide Table of Contents

    Interface INeuralQuery

    A neural 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 INeuralQuery : IFieldNameQuery, IQuery

    Properties

    | Edit this page View Source

    ExpandNestedDocs

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

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

    Filter

    A query used to reduce the number of documents considered.

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

    K

    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
    [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 (radial search). Only one of K, MaxDistance, or MinScore can be specified.

    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).

    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 (radial search). Only one of K, MaxDistance, or MinScore can be specified.

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

    ModelId

    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
    [DataMember(Name = "model_id")]
    string ModelId { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    QueryImage

    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
    [DataMember(Name = "query_image")]
    string QueryImage { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    QueryText

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

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

    QueryTokens

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

    Declaration
    [DataMember(Name = "query_tokens")]
    IDictionary<string, float> QueryTokens { get; set; }
    Property Value
    Type Description
    IDictionary<string, 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.

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

    SemanticFieldSearchAnalyzer

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

    Declaration
    [DataMember(Name = "semantic_field_search_analyzer")]
    string SemanticFieldSearchAnalyzer { get; set; }
    Property Value
    Type Description
    string

    Extension Methods

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