How it works
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
- All indexes must be loaded locally (via
load_index/load_indexes) and share the same embedding model. Querying indexes with different models returns an error. top_kis global, not per-index - it caps the merged result set. The default is10(a single-indexquerydefaults to5).- Hybrid via
alpha:alphaworks as in a single-index query (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 a single-index query. - Bulk lifecycle:
load_indexes(names)returns aLoadIndexesResultwithloadedandfailed(best-effort; a typo in one name doesn’t roll back the others), andunload_indexes(names)releases them and is idempotent.
Implementation
Multi-index search is available in the Python (query_multi_index), JavaScript
(queryMultiIndex), and Elixir (Moss.Client.query_multi_index/4) SDKs, each with
matching bulk load_indexes / unload_indexes calls. See the
Python guide for a runnable example.
Related
Retrieval
Single-index querying, filters, and hybrid search.
Python reference
query_multi_index, load_indexes, unload_indexes.