Hybrid Search definition
Hybrid search combines keyword search, such as BM25 full-text ranking, with semantic vector search and merges their results into one ranked list. Keyword matching catches exact terms like product codes and names, while vector search understands meaning and paraphrases, so the combination returns relevant results for a wider range of queries than either method alone.
Why combine keyword and vector search?
Each method fails in predictable ways. Vector search can miss exact matches that matter: a query for error E1042 or a SKU like XR-200 may return documents about similar errors or products instead of the exact one. Keyword search misses meaning: how do I get my money back will not match an article titled refund policy. Hybrid search runs both and lets each cover the other's blind spots.
Evaluations on real-world retrieval tasks commonly find that hybrid retrieval beats either method alone, especially for business content full of names, codes and jargon mixed with natural-language questions. That is why it has become a default choice for retrieval-augmented generation pipelines.
Hybrid search also degrades gracefully. When an embedding model handles an unusual query poorly, keyword results still surface sensible matches, and when a query uses words absent from the documents, vector results fill the gap. Users rarely see an empty or absurd results page.
How hybrid search works
A typical hybrid search pipeline runs the two retrievers side by side and then fuses their outputs. The steps below are the same whether you use one search engine or two separate systems glued together:
- Keyword retrieval: BM25 or similar full-text ranking returns the top matches
- Vector retrieval: the query is embedded and the nearest neighbors are retrieved from a vector index
- Fusion: the two ranked lists are merged into one, commonly with reciprocal rank fusion (RRF) or a weighted score
- Filtering: metadata such as language, date, product line or user permissions narrows the candidates
- Optional reranking: a cross-encoder rescores the top results for final precision
Reciprocal rank fusion and weighting
Keyword and vector scores live on different scales, so adding them directly rarely works. Reciprocal rank fusion sidesteps this by using only ranks: each document scores the sum of 1 divided by a constant plus its rank in each list, so items that rank well in both lists rise to the top. RRF needs almost no tuning, which makes it a strong default.
Weighted fusion normalizes the two scores and blends them with a tunable weight, letting you lean toward keyword matching for catalogs full of part numbers or toward semantic matching for conversational queries. Either way, tune against a test set of real queries rather than intuition, and revisit the weights as content changes.
Tools and implementation
Many search platforms now support hybrid search natively, including Elasticsearch, OpenSearch, Azure AI Search, Weaviate, Qdrant, Vespa and MongoDB Atlas, while PostgreSQL can combine its full-text search with pgvector in a single query. Keeping both indexes in one system simplifies filtering, permissions and consistency when documents change.
Nexzem implements hybrid search for ecommerce catalogs, support centers and RAG assistants, measuring recall and answer quality on client queries before and after each change. See semantic search for the vector half of the picture, and our RAG development service for complete assistants.