Skip to main content

Module bm25_cache

Module bm25_cache 

Source

Structs§

Bm25CacheEntry

Functions§

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.

Type Aliases§

SharedBm25Cache