pub struct VSimOptions<'a> { /* private fields */ }Expand description
Options for the vsim command.
Implementations§
Source§impl<'a> VSimOptions<'a>
impl<'a> VSimOptions<'a>
Sourcepub fn with_scores(self) -> Self
pub fn with_scores(self) -> Self
returns the similarity score (from 1 to 0) alongside each result. A score of 1 is identical; 0 is the opposite.
Sourcepub fn with_attributes(self) -> Self
pub fn with_attributes(self) -> Self
returns, for each element, the JSON attribute associated with the element or NULL when no attributes are present.
Sourcepub fn epsilon(self, delta: f32) -> Self
pub fn epsilon(self, delta: f32) -> Self
is a floating point number between 0 and 1. It is used to retrieve elements that have a distance that is no further than the specified delta. In vector sets, returned elements have a similarity score (when compared to the query vector) that is between 1 and 0, where 1 means identical and 0 means opposite vectors. For example, if the EPSILON option is specified with an argument of 0.2, it means only elements that have a similarity of 0.8 or better (a distance < 0.2) are returned. This is useful when you specify a large COUNT, but you don’t want elements that are too far away from the query vector.
Sourcepub fn ef(self, search_exploration_factor: u32) -> Self
pub fn ef(self, search_exploration_factor: u32) -> Self
Controls the search effort.
Higher values explore more nodes, improving recall at the cost of speed. Typical values range from 50 to 1000.
Sourcepub fn filter(self, expression: &'a str) -> Self
pub fn filter(self, expression: &'a str) -> Self
Applies a filter expression to restrict matching elements. See the filtered search section for syntax details.
Sourcepub fn filter_ef(self, max_filtering_effort: u32) -> Self
pub fn filter_ef(self, max_filtering_effort: u32) -> Self
Limits the number of filtering attempts for the FILTER expression.
See the filtered search section for more.