Fuses semantic vector search with lexical full-text search using Reciprocal Rank Fusion in a PL/pgSQL RPC.
100
100%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
supabase/ivfflat-index. HALT if an IVFFlat index is detected on the target column.60.semantic_score and fulltext_score individually. The caller MUST receive both component scores alongside combined_score.INNER JOIN to fuse the two CTEs. A FULL OUTER JOIN is mandatory so rows appearing in only one result set are still returned.tsvector GIN index check. If no GIN index exists, HALT and instruct the caller to create one before proceeding.score = 1.0 / (k + rank). No other weighting formula is permitted.<=> cosine distance operator from pgvector.plainto_tsquery (not to_tsquery) to safely handle raw user input.0, not be excluded.STABLE PL/pgSQL function to allow query-plan caching.EXPLAIN (ANALYZE, FORMAT JSON) to confirm both HNSW and GIN indexes are used.