Skip to main content Module bm25_cache Copy item path Source Bm25CacheEntry IndexFingerprint Cheap content fingerprint of the persisted index file: (mtime, size). get_or_background Get index from cache (fresh or stale), triggering background rebuild if stale.
Returns None only if no cache entry exists at all. get_or_load Get the BM25 index from cache if available and fresh, otherwise load/build,
cache it, and return. Uses Arc to avoid cloning the entire index. memory_usage Returns the approximate heap memory used by the cached BM25 index, or 0. shrink_resident_to_snippet Trims the RESIDENT cached index for root so each chunk keeps only its first
keep_lines lines of content, reclaiming the RAM held by full source
bodies once the embedding pass has consumed them. unload Drops the cached BM25 index, freeing its heap memory.
The index will be rebuilt from disk on the next search. SharedBm25Cache