query_multi_index
in the reference.
Usage
Load the indexes (in bulk withload_indexes), then query them together with
query_multi_index. Every result document carries an index_name so you know where it came
from.
Behavior notes
- All indexes must be loaded locally (via
load_indexorload_indexes) and share the same embedding model. top_kis global, not per-index - it caps the merged result set.QueryOptions.alphaworks as in single-indexquery(default0.8):1.0is embedding-only,0.0is keyword-only, and values in between fuse both signals with Reciprocal Rank Fusion. Keyword scoring runs each index’s own BM25 and merges hits by score before fusion, so keyword and hybrid ordering across indexes is approximate.filterandembeddingwork the same as in single-indexquery.
Bulk lifecycle
load_indexes(names) returns a
LoadIndexesResult with loaded and failed. It is
best-effort: a typo in one name does not roll back the others, and reloading an
already-loaded index is idempotent.
unload_indexes(names) releases them when you
are done.
Related
Hybrid search
How
alpha blends semantic and keyword scoring.MossClient reference
query_multi_index, load_indexes, unload_indexes.