#[non_exhaustive]pub struct Parameters {
pub approximate_neighbor_candidates: i32,
pub leaf_nodes_search_fraction: f64,
/* private fields */
}Available on crate feature
feature-online-store-service only.Expand description
Parameters that can be overrided in each query to tune query latency and recall.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.approximate_neighbor_candidates: i32Optional. The number of neighbors to find via approximate search before exact reordering is performed; if set, this value must be > neighbor_count.
leaf_nodes_search_fraction: f64Optional. The fraction of the number of leaves to search, set at query time allows user to tune search performance. This value increase result in both search accuracy and latency increase. The value should be between 0.0 and 1.0.
Implementations§
Source§impl Parameters
impl Parameters
pub fn new() -> Self
Sourcepub fn set_approximate_neighbor_candidates<T: Into<i32>>(self, v: T) -> Self
pub fn set_approximate_neighbor_candidates<T: Into<i32>>(self, v: T) -> Self
Sets the value of approximate_neighbor_candidates.
§Example
ⓘ
let x = Parameters::new().set_approximate_neighbor_candidates(42);Sourcepub fn set_leaf_nodes_search_fraction<T: Into<f64>>(self, v: T) -> Self
pub fn set_leaf_nodes_search_fraction<T: Into<f64>>(self, v: T) -> Self
Sets the value of leaf_nodes_search_fraction.
§Example
ⓘ
let x = Parameters::new().set_leaf_nodes_search_fraction(42.0);Trait Implementations§
Source§impl Clone for Parameters
impl Clone for Parameters
Source§fn clone(&self) -> Parameters
fn clone(&self) -> Parameters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Parameters
impl Debug for Parameters
Source§impl Default for Parameters
impl Default for Parameters
Source§fn default() -> Parameters
fn default() -> Parameters
Returns the “default value” for a type. Read more
Source§impl PartialEq for Parameters
impl PartialEq for Parameters
impl StructuralPartialEq for Parameters
Auto Trait Implementations§
impl Freeze for Parameters
impl RefUnwindSafe for Parameters
impl Send for Parameters
impl Sync for Parameters
impl Unpin for Parameters
impl UnwindSafe for Parameters
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more