mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-18 18:56:25 +00:00
Switch from version to backend selector
This commit is contained in:
@ -485,7 +485,7 @@ where
|
||||
|
||||
// If an embedder wasn't used in the typedchunk but must be binary quantized
|
||||
// we should insert it in `dimension`
|
||||
let index_version = self.index.get_version(self.wtxn)?.unwrap();
|
||||
let backend = self.index.get_vector_store(self.wtxn)?;
|
||||
for (name, action) in settings_diff.embedding_config_updates.iter() {
|
||||
if action.is_being_quantized && !dimension.contains_key(name.as_str()) {
|
||||
let index = self.index.embedding_configs().embedder_id(self.wtxn, name)?.ok_or(
|
||||
@ -494,12 +494,8 @@ where
|
||||
key: None,
|
||||
},
|
||||
)?;
|
||||
let reader = VectorStore::new(
|
||||
index_version,
|
||||
self.index.vector_store,
|
||||
index,
|
||||
action.was_quantized,
|
||||
);
|
||||
let reader =
|
||||
VectorStore::new(backend, self.index.vector_store, index, action.was_quantized);
|
||||
let Some(dim) = reader.dimensions(self.wtxn)? else {
|
||||
continue;
|
||||
};
|
||||
@ -529,7 +525,7 @@ where
|
||||
|
||||
pool.install(|| {
|
||||
let mut writer =
|
||||
VectorStore::new(index_version, vector_hannoy, embedder_index, was_quantized);
|
||||
VectorStore::new(backend, vector_hannoy, embedder_index, was_quantized);
|
||||
writer.build_and_quantize(
|
||||
wtxn,
|
||||
// In the settings we don't have any progress to share
|
||||
|
Reference in New Issue
Block a user