pub struct FindNearest {
pub distance_measure: Option<String>,
pub distance_result_property: Option<String>,
pub distance_threshold: Option<f64>,
pub limit: Option<i32>,
pub query_vector: Option<Value>,
pub vector_property: Option<PropertyReference>,
}Expand description
Nearest Neighbors search config. The ordering provided by FindNearest supersedes the order_by stage. If multiple documents have the same vector distance, the returned document order is not guaranteed to be stable between queries.
This type is not used in any activity, and only used as part of another schema.
Fields§
§distance_measure: Option<String>Required. The Distance Measure to use, required.
distance_result_property: Option<String>Optional. Optional name of the field to output the result of the vector distance calculation. Must conform to entity property limitations.
distance_threshold: Option<f64>Optional. Option to specify a threshold for which no less similar documents will be returned. The behavior of the specified distance_measure will affect the meaning of the distance threshold. Since DOT_PRODUCT distances increase when the vectors are more similar, the comparison is inverted. * For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold * For DOT_PRODUCT: WHERE distance >= distance_threshold
limit: Option<i32>Required. The number of nearest neighbors to return. Must be a positive integer of no more than 100.
query_vector: Option<Value>Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
vector_property: Option<PropertyReference>Required. An indexed vector property to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
Trait Implementations§
Source§impl Clone for FindNearest
impl Clone for FindNearest
Source§fn clone(&self) -> FindNearest
fn clone(&self) -> FindNearest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more