Commit graph

1 commit

Author SHA1 Message Date
jedarden
c9743d8897 P1.4 Result merger - Verify complete implementation
This bead verified that the result merger implementation in
crates/miroir-core/src/merger.rs is complete and production-ready.

All acceptance criteria from plan §8 "Result merger" are met:
- Global sort by _rankingScore descending across shards
- offset + limit applied after merge (not per-shard)
- _rankingScore stripped when client_requested_score=false
- _miroir_shard and all _miroir_* fields always stripped
- Facet counts sum correctly including keys unique to one shard
- estimatedTotalHits summed across shards
- processingTimeMs = max across covering set
- Stable serialization (byte-identical JSON for same input)

Additional features:
- Binary min-heap optimization for large result sets
- Tie-breaking by primary_key on equal scores
- Degraded mode when shards fail
- Facet filtering support

All 21 tests pass. Implementation verified and documented.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 08:51:39 -04:00