Expand description
Distributed query implementation.
This module handles queries that span multiple shards using a two-phase TF-IDF approach:
- Scatter (Phase 1): Get local term frequencies from all shards
- Gather (Phase 2): Aggregate to global document frequencies
- Scatter (Phase 3): Compute TF-IDF with global DF
- Gather (Phase 4): Merge top-k results
Structs§
- Distributed
Hybrid Config - Configuration for distributed hybrid queries.
- Distributed
Query Engine - Distributed query engine implementing two-phase TF-IDF.
Functions§
- merge_
results - Merge scored results from multiple shards.
- tokenize
- Tokenizer matching phago-rag’s tokenizer.