When HybridSearch is called from the HTTP endpoint without a
match_count field, params.MatchCount defaults to Go's zero value.
The guard
if len(deduplicatedChunks) > params.MatchCount { … [:0] }
then silently truncated every result list to empty, so processSearchResults
was called with 0 chunks and returned nil — 64 RRF-fused results → 0.
Fix: treat MatchCount ≤ 0 as "no explicit limit" and fall back to the
same floor (50) used by the over-retrieval phase. Callers that set
MatchCount explicitly (chat pipeline, knowledge.go, agent tools) are
unaffected.
Verified: vector=50 + keyword=50 → RRF=64 → processSearchResults(50) → 108
final results (50 primary + 61 enrichment neighbours/parents) for
"M1000 MP frequency bands LTE cellular" query.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>