Skip to main content

IndexParams

Struct IndexParams 

Source
pub struct IndexParams { /* private fields */ }

Implementations§

Source§

impl IndexParams

Source

pub fn new(ty: IndexType) -> Result<Self>

Source

pub fn index_type(&self) -> IndexType

Source

pub fn metric_type(&self) -> MetricType

Source

pub fn set_metric_type(&mut self, metric: MetricType) -> Result<()>

Source

pub fn quantize_type(&self) -> QuantizeType

Source

pub fn set_quantize_type(&mut self, q: QuantizeType) -> Result<()>

Source

pub fn set_hnsw_params(&mut self, m: i32, ef_construction: i32) -> Result<()>

Set HNSW-specific parameters. Only valid when index_type() == Hnsw.

Source

pub fn hnsw_m(&self) -> i32

Source

pub fn hnsw_ef_construction(&self) -> i32

Source

pub fn set_ivf_params( &mut self, n_list: i32, n_iters: i32, use_soar: bool, ) -> Result<()>

Set IVF-specific parameters.

Source

pub fn ivf_params(&self) -> Result<(i32, i32, bool)>

Source

pub fn set_invert_params( &mut self, enable_range_opt: bool, enable_wildcard: bool, ) -> Result<()>

Set inverted-index-specific parameters.

Source

pub fn invert_params(&self) -> Result<(bool, bool)>

Trait Implementations§

Source§

impl Drop for IndexParams

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for IndexParams

Source§

impl Sync for IndexParams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.