rsclaw-kb 0.1.0

Kb crate for RsClaw — internal workspace crate, not for direct use
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Full rebuild of both index layers from redb. Used at startup,
//! after detecting a corrupt tantivy dir, or on manual admin trigger.

use anyhow::Result;

use super::KbIndex;
use crate::store::KbStore;

pub fn from_redb(idx: &KbIndex, store: &KbStore) -> Result<()> {
    idx.hnsw.rebuild(store)?;
    idx.tantivy.rebuild(store)?;
    Ok(())
}