ProjectBuild a Permission-Aware Knowledge Hub as an MCP Server: the explanation · Module 9: Hybrid search and ranking · part 11 of 22
Part 11 · Module 9: Hybrid search and ranking
Module 9: Hybrid search and ranking
25 min read·
About 50 minutes · Needs: Module 5 (the chunks table), Module 7 (groups), Module 8 (embeddings and chunks) · Code: server/wayfinder/search.py, server/tests/retrieval/test_search.py
Where this fits
This module (blue): the vector and full-text searches inside PostgreSQL and the fusion that merges them; the embedding model is amber because it is a model.
This module is the search engine inside Wayfinder: how a question becomes a short, ranked list of passages. The highlighted parts are the two searches that run inside PostgreSQL (meaning and words), the fusion step that merges them with a few boosts, and the embedding model that turns the question into a vector. The permission filter sits inside the same queries; Module 10 is about that filter alone.
The rest of this project is yours to keep
This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.