Expand description
The one resolution of a query string into a live embedding, shared by every
read path so vec_degraded means the same thing in each envelope.
The one place a read path turns a query string into a live embedding.
recall and hybrid-search both need the same three-way outcome — a
vector, a deliberate skip, or a degradation — and both need to report it the
same way on their envelope. They used to carry byte-identical copies of that
logic, including the reason string, which is duplicated knowledge rather than
merely similar code: changing the degradation contract meant remembering to
edit two files, and nothing failed if you edited one.
Keeping the resolution here also keeps the envelope honest. vec_degraded
is what tells a caller that a hybrid search silently became a pure FTS5
search, and a single implementation is what guarantees both commands raise
it under exactly the same conditions.
Structs§
- Query
Embedding - Live query embedding plus the flags describing whether it succeeded.
Constants§
- FALLBACK_
FTS_ ONLY_ CODE reason_coderecorded for a degradation the operator asked for.- FALLBACK_
FTS_ ONLY_ REASON - Machine-readable
vec_errorfor a degradation the operator asked for.
Functions§
- degradation_
failure - Decides whether a degraded read must become a non-zero exit.
- resolve_
query_ embedding - Resolves the query embedding, degrading to FTS5-only instead of failing.