computer: snapshot

This commit is contained in:
nym21
2025-12-29 00:14:54 +01:00
parent 236b4097c5
commit 31d2f8ef37
37 changed files with 593 additions and 387 deletions

View File

@@ -12,6 +12,8 @@ use vecdb::{
use super::{Indexes, indexes, utils::OptionExt};
pub const DB_NAME: &str = "fetched";
#[derive(Clone, Traversable)]
pub struct Vecs {
db: Database,
@@ -23,7 +25,7 @@ pub struct Vecs {
impl Vecs {
pub fn forced_import(parent: &Path, fetcher: Fetcher, version: Version) -> Result<Self> {
let db = Database::open(&parent.join("fetched"))?;
let db = Database::open(&parent.join(DB_NAME))?;
db.set_min_len(PAGE_SIZE * 1_000_000)?;
let this = Self {