rsclaw 2026.5.20

AI Agent Engine Compatible with OpenClaw
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::kb::store::KbStore;

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