#[non_exhaustive]pub struct IndexOptions {
pub min_rows: usize,
pub rebuild: bool,
pub kind: IndexKind,
pub nlist: Option<usize>,
}Expand description
Settings for Namespace::index.
New fields will be added, so build one from default() and the setters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.min_rows: usizeA segment with fewer documents than this is not indexed and is read whole, since a flat read of a small segment costs about what the index head does. Zero indexes everything, an empty segment included.
rebuild: boolBuild a new generation for a segment that already has an index, instead
of leaving it alone. The old object stays until
gc collects it.
kind: IndexKindWhich algorithm to build. Different segments may use
different kinds; rebuilding a segment to a different kind replaces its
entry like any other rebuild. Defaults to IndexKind::Hnsw.
nlist: Option<usize>How many partitions an SQ8 index has. None chooses from the
segment’s row count: one partition for a small segment and more for a big
one. A query then reads only the few partitions nearest to it. Some(0) is
ItzmaError::InvalidQuery, and a number
above the segment’s rows is cut to it.
Implementations§
Trait Implementations§
Source§impl Clone for IndexOptions
impl Clone for IndexOptions
Source§impl Debug for IndexOptions
impl Debug for IndexOptions
Source§impl Default for IndexOptions
impl Default for IndexOptions
Source§impl<'de> Deserialize<'de> for IndexOptionswhere
IndexOptions: Default,
impl<'de> Deserialize<'de> for IndexOptionswhere
IndexOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for IndexOptions
Source§impl PartialEq for IndexOptions
impl PartialEq for IndexOptions
Source§impl Serialize for IndexOptions
impl Serialize for IndexOptions
impl StructuralPartialEq for IndexOptions
Auto Trait Implementations§
impl Freeze for IndexOptions
impl RefUnwindSafe for IndexOptions
impl Send for IndexOptions
impl Sync for IndexOptions
impl Unpin for IndexOptions
impl UnsafeUnpin for IndexOptions
impl UnwindSafe for IndexOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more