-- pg_turbovec v1.14.0 -- Phase D breadth-parity minor release. -- -- This file is a *reference mirror*. The authoritative install -- script is generated by `cargo pgrx schema`. -- -- v1.14.0 adds the multivector / hybrid-search SQL surface (driven by -- Phase D, vs VectorChord / Qdrant): -- -- 1. turbovec.max_sim(vector[], vector[]) -> double precision -- turbovec.max_sim_cosine(vector[], vector[]) -> double precision -- ColBERT-style late-interaction MaxSim: -- sum_{q in Q} max_{d in D} sim(q, d) -- over per-token vector[] arrays. max_sim uses dot-product -- similarity (correct for L2-normalised tokens); max_sim_cosine -- uses cosine similarity (1 - cosine_distance). Both are -- *similarities* (higher = better; ORDER BY ... DESC). All token -- vectors across both arrays must share one dimension (ERROR on -- mismatch); an empty query or empty doc scores 0.0. This is a -- RE-RANK primitive (ANN-retrieve candidates on a pooled vector, -- MaxSim-rerank the top-N) -- the token arrays are NOT indexed; -- index-native late interaction remains a future phase. -- -- 2. turbovec.rrf_score(rank integer, k integer DEFAULT 60) -- -> double precision -- Reciprocal Rank Fusion term 1.0 / (k + rank) for fusing a -- dense ANN ranking with a sparse / keyword ranking. Pairs with -- the documented CTE recipe in docs/HYBRID_SEARCH.md. A -- non-positive (k + rank) raises ERROR. -- -- These ARE new SQL objects (functions). `cargo pgrx schema` emits -- their CREATE FUNCTION into the authoritative 1.13.1--1.14.0 upgrade -- script; this reference mirror does not duplicate them. -- -- Named vectors (multiple vector columns per row) are a documented -- SCHEMA pattern (docs/HYBRID_SEARCH.md), not new code. Out-of-core -- BUILD (roadmap Phase D-3) already shipped in v1.12.0. -- -- The on-disk relfile format is UNCHANGED (MetaPageData::version = 4); -- the new SQL surface is purely additive. There is no index-AM change -- and no on-disk migration. `ALTER EXTENSION pg_turbovec UPDATE TO -- '1.14.0';` resolves cleanly; the additive functions are created by -- the generated upgrade script. No REINDEX is needed -- existing -- indexes work unchanged.