pub struct IndexMeta {Show 13 fields
pub version: String,
pub backend_name: String,
pub embedding_model: String,
pub dimensions: usize,
pub backend_kwargs: HashMap<String, Value>,
pub embedding_mode: String,
pub passage_sources: Vec<PassageSource>,
pub embedding_options: HashMap<String, Value>,
pub is_compact: Option<bool>,
pub is_pruned: Option<bool>,
pub total_passages: Option<usize>,
pub built_from_precomputed_embeddings: Option<bool>,
pub embeddings_source: Option<String>,
}Expand description
Represents the metadata stored in <name>.meta.json for a LEANN index.
Fields§
§version: String§backend_name: String§embedding_model: String§dimensions: usize§backend_kwargs: HashMap<String, Value>§embedding_mode: String§passage_sources: Vec<PassageSource>§embedding_options: HashMap<String, Value>§is_compact: Option<bool>Whether the HNSW index uses compact CSR storage.
is_pruned: Option<bool>Whether embeddings have been pruned (for recompute mode).
total_passages: Option<usize>Total passages in the index (updated on append).
built_from_precomputed_embeddings: Option<bool>Set if built from pre-computed embeddings.
embeddings_source: Option<String>Implementations§
Source§impl IndexMeta
impl IndexMeta
Sourcepub fn distance_metric(&self) -> DistanceMetric
pub fn distance_metric(&self) -> DistanceMetric
Get the distance metric from backend kwargs.
Sourcepub fn requires_recompute(&self) -> bool
pub fn requires_recompute(&self) -> bool
Whether this index requires embedding recomputation at search time.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IndexMeta
impl<'de> Deserialize<'de> for IndexMeta
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IndexMeta
impl RefUnwindSafe for IndexMeta
impl Send for IndexMeta
impl Sync for IndexMeta
impl Unpin for IndexMeta
impl UnsafeUnpin for IndexMeta
impl UnwindSafe for IndexMeta
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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