MCPcopy Create free account
hub / github.com/cosdata/cosdata / force_index

Method force_index

src/indexes/mod.rs:72–85  ·  view source on GitHub ↗
(
        &self,
        collection: &Collection,
        version: VersionNumber,
        config: &Config,
    )

Source from the content-addressed store, hash-verified

70 ) -> Result<(), WaCustomError>;
71
72 fn force_index(
73 &self,
74 collection: &Collection,
75 version: VersionNumber,
76 config: &Config,
77 ) -> Result<(), WaCustomError> {
78 if !self.is_configured() {
79 let mut embeddings_guard = self.embeddings_collected().write().unwrap();
80 self.finalize_sampling(&collection.lmdb, config, &embeddings_guard)?;
81 let embeddings = std::mem::take(&mut *embeddings_guard);
82 self.index_embeddings(collection, embeddings, version, config)?;
83 }
84 Ok(())
85 }
86
87 fn sample_embeddings(
88 &self,

Callers 1

Implementers 5

key_value.rssrc/indexes/key_value.rs
usv.rssrc/indexes/usv.rs
mod.rssrc/indexes/inverted/mod.rs
mod.rssrc/indexes/tf_idf/mod.rs
mod.rssrc/indexes/hnsw/mod.rs

Calls 4

is_configuredMethod · 0.45
embeddings_collectedMethod · 0.45
finalize_samplingMethod · 0.45
index_embeddingsMethod · 0.45

Tested by

no test coverage detected