pub struct IndexParams { /* private fields */ }Implementations§
Source§impl IndexParams
impl IndexParams
pub fn new(ty: IndexType) -> Result<Self>
pub fn index_type(&self) -> IndexType
pub fn metric_type(&self) -> MetricType
pub fn set_metric_type(&mut self, metric: MetricType) -> Result<()>
pub fn quantize_type(&self) -> QuantizeType
pub fn set_quantize_type(&mut self, q: QuantizeType) -> Result<()>
Sourcepub fn set_hnsw_params(&mut self, m: i32, ef_construction: i32) -> Result<()>
pub fn set_hnsw_params(&mut self, m: i32, ef_construction: i32) -> Result<()>
Set HNSW-specific parameters. Only valid when index_type() == Hnsw.
pub fn hnsw_m(&self) -> i32
pub fn hnsw_ef_construction(&self) -> i32
Sourcepub fn set_ivf_params(
&mut self,
n_list: i32,
n_iters: i32,
use_soar: bool,
) -> Result<()>
pub fn set_ivf_params( &mut self, n_list: i32, n_iters: i32, use_soar: bool, ) -> Result<()>
Set IVF-specific parameters.
pub fn ivf_params(&self) -> Result<(i32, i32, bool)>
Sourcepub fn set_invert_params(
&mut self,
enable_range_opt: bool,
enable_wildcard: bool,
) -> Result<()>
pub fn set_invert_params( &mut self, enable_range_opt: bool, enable_wildcard: bool, ) -> Result<()>
Set inverted-index-specific parameters.
pub fn invert_params(&self) -> Result<(bool, bool)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexParams
impl RefUnwindSafe for IndexParams
impl Unpin for IndexParams
impl UnsafeUnpin for IndexParams
impl UnwindSafe for IndexParams
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