Implements the Elasticsearch dfs_query_then_fetch pattern as the global-IDF preflight phase (OP#4). This solves the cross-shard score comparability problem that caused both RRF (τ=0.14) and score-based merge (τ=0.79) to fail the τ≥0.95 quality threshold. Core changes: - New DfsPhase in scatter-gather pipeline (scatter.rs): - PreflightRequest/PreflightResponse for term statistics collection - GlobalIdf for coordinator-side IDF aggregation - execute_preflight() for phase 1 of DFS - dfs_query_then_fetch_search() for full two-phase execution - ScoreMergeStrategy in merger.rs for global-IDF scoring - HttpClient with preflight_node() support (client.rs) - Search route integration using dfs_query_then_fetch_search() - Integration test with skewed corpus demonstrating the fix The preflight phase adds ~15µs of aggregation overhead at 64 shards (O(shards * terms)) with O(1) per-shard parallelization. Network latency adds one round-trip before the actual search query. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| miroir-core | ||
| miroir-ctl | ||
| miroir-proxy | ||