Skip to main content

Hybrid search: BM25 meets vector

June 15, 2026 Glassy Team 4 min read

Keyword search finds the exact phrase. Vector search finds the related concept you forgot the words for. Glassy runs both and merges the results. You get the precision of full-text search and the recall of semantic search in one query.

BM25 via SQLite FTS5

Every note, bookmark, and document in Glassy is indexed in a SQLite full-text search table using the FTS5 extension with BM25 ranking. This gives you fast, precise keyword matching with relevance scoring. It handles typos gracefully and respects boolean operators.

Vector search with embeddings

Glassy generates vector embeddings for your content using either local models (384-dim, running in your browser) or cloud models (768-dim, via Gemini). These embeddings capture the semantic meaning of your notes. When you search by meaning, Glassy finds related content even when the exact words do not match.

Reciprocal Rank Fusion

To merge BM25 and vector results, Glassy uses Reciprocal Rank Fusion (RRF). This algorithm combines the rankings from both search methods without needing to normalize scores across different scales. The result is a single ranked list that benefits from both precision and recall.

Why it matters

If you have ever searched for something you knew existed but could not remember the title — that is the vector search finding it by meaning. If you have ever searched for an exact code snippet or error message — that is BM25 finding it by keyword. Hybrid search gives you both, every time, without having to choose.

Keep reading