vestige/crates/vestige-core
Bot f3e25f7503 fix: push type filters into SQL WHERE clause + expose in MCP search
Type filtering (include_types/exclude_types) was applied post-fetch after
the database LIMIT, which could return zero results when all top-N
results were of the filtered type. This pushes type filters into the SQL
WHERE clause in keyword_search_with_scores() so they apply before the
limit. Semantic results still get post-fetch filtering as a safety net
since the vector index cannot filter by type.

Also adds hybrid_search_filtered() as the new primary method, with the
original hybrid_search() delegating to it with no filters for backward
compatibility. The MCP search tool now exposes include_types and
exclude_types parameters.

Includes 5 new test cases covering include, exclude, precedence,
empty results, and backward compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 14:42:16 -05:00
..
benches feat: Vestige v2.0.0 "Cognitive Leap" — 3D dashboard, HyDE search, WebSocket events 2026-02-22 03:07:25 -06:00
src fix: push type filters into SQL WHERE clause + expose in MCP search 2026-04-13 14:42:16 -05:00
Cargo.toml build: allow building on older glibc versions 2026-04-11 08:21:53 +02:00