How search modes work (hybrid, BM25, semantic, vector, RRF)
Hybrid (default)
Combines keyword search and two semantic vectors per product, then merges results with RRF (see below). Best for matching social posts or topic blurbs to Packt titles — exact words plus related books.
- BM25 on full product
text
- Semantic match on
vector (catalog: tech, tags, chapters)
- Semantic match on
vector_title (title, subtitle, authors)
Requires Ollama (nomic-embed-text) at search time.
BM25
Classic keyword search. Your query words should appear in the indexed product text. No embeddings — fast, good for exact terms (framework names, jargon, ISBN fragments).
Semantic
Meaning-based search on both vector and vector_title. Before embedding, common filler words are removed from your query (stop-word strip), e.g. “what are the best python books” → focuses on “python books”. Good for long, natural-language queries.
Vector
Same as semantic (two embedding columns, merged with RRF) but embeds your query exactly as typed — no stop-word strip. Use when you want every word in the query to influence the embedding.
RRF (Reciprocal Rank Fusion)
Hybrid and semantic modes run several ranked lists (BM25 and/or vectors). Scores are not directly comparable, so we merge by rank position: books that score well in more than one list rise to the top. Books strong in only one channel can still appear if they rank near the top there.
Stop-word strip
Words like “what”, “the”, “best”, “for” are removed before embedding in semantic and hybrid (for the vector part). Vector mode skips that step. BM25 always uses your full query text.
Quick pick:
exact words in the catalog → bm25 ·
wordy social text → semantic ·
keep every query word in the embedding → vector ·
normal matching → hybrid