Class NeuralQuery
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
[DataContract]
public class NeuralQuery : FieldNameQueryBase, INeuralQuery, IFieldNameQuery, IQuery
Properties
|
Edit this page
View Source
Conditionless
Declaration
protected override bool Conditionless { get; }
Property Value
Overrides
|
Edit this page
View Source
ExpandNestedDocs
When true, retrieves scores for all nested field documents within each parent document.
Used with nested queries.
Declaration
public bool? ExpandNestedDocs { get; set; }
Property Value
|
Edit this page
View Source
Filter
A query used to reduce the number of documents considered.
Declaration
public IQueryContainer Filter { get; set; }
Property Value
|
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
public int? K { get; set; }
Property Value
|
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
public float? MaxDistance { get; set; }
Property Value
|
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
public IDictionary<string, object> MethodParameters { get; set; }
Property Value
|
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
public float? MinScore { get; set; }
Property Value
|
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
public string ModelId { get; set; }
Property Value
|
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
public string QueryImage { get; set; }
Property Value
|
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
public string QueryText { get; set; }
Property Value
|
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
public IDictionary<string, float> QueryTokens { get; set; }
Property Value
|
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
public Union<bool, KnnQueryRescoreContext> Rescore { get; set; }
Property Value
|
Edit this page
View Source
SemanticFieldSearchAnalyzer
An analyzer for tokenizing QueryText when using a sparse encoding model.
Cannot be used together with ModelId.
Declaration
public string SemanticFieldSearchAnalyzer { get; set; }
Property Value
Implements
Extension Methods