pub struct IndexMetadata {
pub dimension: usize,
pub distance_metric: DistanceMetric,
pub entry_point: Option<EntityId>,
pub max_layer: usize,
pub m: usize,
pub m_max0: usize,
pub ef_construction: usize,
pub ef_search: usize,
pub ml_bits: u64,
pub pq_segments: usize,
pub pq_centroids: usize,
}Expand description
Index metadata stored in the database.
Fields§
§dimension: usizeThe dimension of embeddings.
distance_metric: DistanceMetricThe distance metric.
entry_point: Option<EntityId>The entry point entity ID, if any.
max_layer: usizeThe maximum layer in the graph.
m: usizeThe M parameter.
m_max0: usizeThe M_max0 parameter.
ef_construction: usizeThe ef_construction parameter.
ef_search: usizeThe ef_search parameter.
ml_bits: u64The ml parameter (stored as bits).
pq_segments: usizeNumber of PQ segments (0 = disabled).
pq_centroids: usizeNumber of PQ centroids per segment.
Implementations§
Source§impl IndexMetadata
impl IndexMetadata
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, VectorError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, VectorError>
Deserialize metadata from bytes.
Trait Implementations§
Source§impl Clone for IndexMetadata
impl Clone for IndexMetadata
Source§fn clone(&self) -> IndexMetadata
fn clone(&self) -> IndexMetadata
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 moreAuto Trait Implementations§
impl Freeze for IndexMetadata
impl RefUnwindSafe for IndexMetadata
impl Send for IndexMetadata
impl Sync for IndexMetadata
impl Unpin for IndexMetadata
impl UnwindSafe for IndexMetadata
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