Skip to main contentModule bm25_cache
Source - Bm25CacheEntry
- 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.
- unload
- Drops the cached BM25 index, freeing its heap memory.
The index will be rebuilt from disk on the next search.
- SharedBm25Cache