Make the VectorStore aware of the index version

This commit is contained in:
Clément Renault
2025-08-12 15:09:26 +02:00
committed by Louis Dureuil
parent 6340412219
commit f5f2f7c6f2
11 changed files with 89 additions and 22 deletions

View File

@ -47,18 +47,20 @@ const HANNOY_M: usize = 16;
const HANNOY_M0: usize = 32;
pub struct VectorStore {
quantized: bool,
embedder_index: u8,
version: (u32, u32, u32),
database: hannoy::Database<Unspecified>,
embedder_index: u8,
quantized: bool,
}
impl VectorStore {
pub fn new(
version: (u32, u32, u32),
database: hannoy::Database<Unspecified>,
embedder_index: u8,
quantized: bool,
) -> Self {
Self { database, embedder_index, quantized }
Self { version, database, embedder_index, quantized }
}
pub fn embedder_index(&self) -> u8 {