You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: split VectorIndexResolver into peek/resolve/ensure_loaded (#18)
* feat: add VectorIndexResolver trait for pluggable index resolution
Replace direct USearchRegistry dependency with a VectorIndexResolver
trait throughout the optimizer rule, physical planner, executor, and
UDTF. USearchRegistry implements the trait (backward compatible).
This enables production systems to implement a catalog-backed resolver
that treats the in-memory index as a cache rather than the source of
truth, following the same publication model as sorted/BM25 indexes.
Key changes:
- Add VectorIndexResolver trait with resolve(name) -> Option<Arc<RegisteredTable>>
- USearchRegistry implements VectorIndexResolver
- All consumers now accept Arc<dyn VectorIndexResolver>
- Add into_resolver() convenience method on USearchRegistry
* feat: split VectorIndexResolver into peek/resolve/ensure_loaded
Split the resolver trait to match DataFusion's sync/async pipeline:
- peek(key) — sync, cheap: returns VectorIndexMeta (metric, schema)
for the optimizer rule to validate ANN rewrites without loading
- resolve(key) — sync: returns loaded RegisteredTable from cache
- ensure_loaded(key) — async: loads index on cache miss, called by
the physical planner before building execution plans
The optimizer rule uses peek (sync, no I/O).
The planner calls ensure_loaded (async) then resolve.
The executor uses resolve (sync, cache only).
This enables catalog-backed resolution where ensure_loaded downloads
and loads index files on demand, while the optimizer stays sync and fast.
* Clarify vector_usearch cache-only behavior
* Reload vector indexes at execute time
0 commit comments