Keyword search finds exact terms such as product codes and legal citations, but fails when people use different words than the document. Vector search finds meaning, so "laptop will not turn on" can match "device does not power up", but it can miss an exact part number. Most real queries need both.
Hybrid search improves relevance when exact terms and meaning both matter, provided that the two result lists are merged with a method such as reciprocal rank fusion, the system is tuned against a set of real queries and a reranker is added only where measurements show it helps.
This article explains how keyword and vector search differ, how hybrid search merges them, when to add reranking, how to evaluate relevance, what hybrid search means for AI applications and how a content platform used it to ground AI-generated articles. It does not compare vector database vendors.
Key takeaways
- Keyword search (BM25) matches exact terms. Vector search matches meaning. Hybrid search runs both and merges the results.
- Reciprocal rank fusion merges lists by rank position and needs no score tuning, which makes it a good default.
- Weighted score combination gives more control but requires normalizing scores that use different scales.
- A reranker, such as a cross-encoder, can improve the top results but adds latency and cost.
- Evaluate with a set of real queries and judged results, using measures such as recall at 10 and NDCG.
- In a delivered project, a hybrid search service combining BM25 and k-NN on OpenSearch gave an AI content generator real, indexed sources to work from.
Keyword search vs vector search
| Keyword search (BM25) | Vector search (embeddings) | |
|---|---|---|
| How it matches | Words in the query against words in the document, weighted by rarity | Meaning of the query against meaning of the document, as numeric vectors |
| Strong at | Exact terms, codes, names, citations, rare words | Paraphrases, synonyms, natural-language questions, other languages |
| Weak at | Synonyms and different wording | Exact identifiers, rare terms, negations, very short queries |
| Explainability | Easy to see why a document matched | Harder to explain a match |
| Infrastructure | Inverted index, mature and cheap | Embedding model plus vector index, more memory and compute |
| Example query it handles well | "error E-104 printer X200" | "my printer stops halfway through a page" |
Neither column wins on its own. The value of hybrid search is that each method covers the other's blind spots.
How hybrid search merges results
- Run both searches. The same query goes to the keyword index and, after being turned into an embedding, to the vector index. Each returns its top results, for example the top 50.
- Merge the lists. Results that appear in both lists move up, and strong results from either list stay in.
- Optionally rerank. A more expensive model scores the top merged results against the query and reorders them.
- Return the final list, often with highlights from the keyword match to show why each result appeared.
Reciprocal rank fusion
Reciprocal rank fusion, introduced by Cormack, Clarke and Büttcher in 2009, gives each document a score of 1 ÷ (k + rank) from each list and adds them up, with k usually set to 60. A document ranked 1st in one list and 3rd in the other scores 1/61 + 1/63, about 0.0323, and beats a document ranked 1st in only one list, at about 0.0164. Because it uses positions, not raw scores, it needs no tuning to make BM25 scores and vector similarities comparable.
Weighted score combination
The alternative normalizes each list's scores to a common range, for example 0 to 1, and combines them with weights, such as 0.3 for keyword and 0.7 for vector. This gives more control, for instance favoring keyword matches in a product catalog, but the weights must be tuned against real queries and retuned when the data or embedding model changes.

Platform support
Most search platforms now support hybrid search directly. OpenSearch combines lexical and vector clauses in a hybrid query and merges their scores in a search pipeline, as described in its hybrid search documentation. Elasticsearch offers reciprocal rank fusion through its retrievers, and PostgreSQL teams often combine full-text search with the pgvector extension. Vector databases such as Weaviate, Qdrant and Pinecone also offer keyword or sparse-vector support alongside dense vectors.
When to add a reranker
A reranker, usually a cross-encoder model, reads the query and each candidate document together and scores how well they match. It is more accurate than comparing separate embeddings, and much slower, so it runs only on the top 20–100 merged results.
Add a reranker when evaluation shows that the right document is usually in the top 50 but not in the top 5. Skip it when latency budgets are tight, when the merged ranking already performs well or when costs per query matter at high volume.
How to evaluate search relevance
- Collect real queries. Take a few hundred from search logs or support tickets, including short codes, long questions and misspellings.
- Judge results. For each query, mark which documents are relevant, ideally with graded labels such as perfect, good and irrelevant.
- Measure. Track recall at 10, meaning how often the relevant documents appear in the top ten, and NDCG at 10, which rewards placing the best documents first.
- Compare configurations. Test keyword only, vector only, hybrid with reciprocal rank fusion, weighted hybrid and hybrid with reranking on the same query set.
- Watch latency and cost. A configuration that improves relevance slightly but doubles response time may not be worth it.
- Repeat after changes. New content, new embedding models and new query patterns change results.
Hybrid search in AI applications
In retrieval-augmented generation, the language model can only answer from what retrieval gives it. If retrieval misses the document with the exact policy number or case reference, the model answers from something less relevant, or invents an answer. Hybrid retrieval reduces that risk, because exact identifiers and paraphrased questions are both covered. Two practices matter most:
- Filter before searching. Apply permissions, tenant and date filters to both searches, so the model never sees documents the user is not allowed to read. Our guide to context engineering covers permission-aware retrieval.
- Return passages with sources. Retrieve sections rather than whole documents, and pass their sources to the model so answers can be checked.
Our comparison of RAG and fine-tuning explains when retrieval is the right approach in the first place.
Search results missing what users mean, or AI answers missing the right document? We design and tune hybrid search and retrieval for your content.
Explore AI servicesA real build: hybrid search for AI content generation
A US law firm runs several marketing websites on Verba, a custom content management system, and uses a content generation feature to help produce articles. AI-generated content is only useful if it is grounded in real sources, and the feature needed both semantic and keyword search, plus a way to tell which topics were gaining interest, without the model inventing sources.
A .wrk team built two Go services.
- A content manager with hybrid search. It indexes the platform's content in OpenSearch and searches it with a combination of BM25 keyword search and k-NN vector search, so both exact legal terms and related concepts are found.
- A trend analyzer. It scores topics by trend, so content generation can focus on subjects that matter now.
- Grounded generation. The content generator receives retrieved passages and trend data as its context, so drafts are built on real, indexed sources.
The same engagement redesigned permissions, cached shared page fragments and moved shared interface components into a versioned package. Read the Verba CMS case study.
Common hybrid search mistakes
- Skipping evaluation. Without a judged query set, every change is a guess.
- Adding raw scores. BM25 scores and vector similarities use different scales. Use rank fusion or normalize first.
- Embedding whole documents. Long documents produce blurry vectors. Split them into passages.
- Ignoring filters. Applying permissions or tenant filters to only one of the two searches leaks results.
- Reranking everything. Rerankers belong on a short list of candidates, not on the whole index.
- Forgetting reindexing. Changing the embedding model means re-embedding every document.
Frequently asked questions
What is hybrid search?
Hybrid search combines keyword search, usually BM25, with vector search based on embeddings. Both run for the same query, and their results are merged into one ranking, so results match exact terms and meaning at the same time.
What is the difference between hybrid search and vector search?
Vector search matches the meaning of a query using embeddings. Hybrid search adds keyword search alongside it and merges the results, which helps with exact terms such as product codes, names and citations that vector search can miss.
What is reciprocal rank fusion?
Reciprocal rank fusion is a method for merging ranked lists. Each document gets 1 ÷ (k + rank) from each list, usually with k set to 60, and the scores are added. It uses positions instead of raw scores, so it works without tuning.
Is hybrid search better for RAG?
Often, yes. Retrieval-augmented generation depends on finding the right passages, and hybrid search covers both exact identifiers and paraphrased questions. Test it against your own queries, since gains vary by content and query type.
Does hybrid search need a reranker?
Not always. Add a reranker when evaluation shows relevant documents appear in the top 50 but not near the top. It improves ordering at the cost of extra latency and compute.
To sum up
Hybrid search runs keyword and vector search together and merges the results, so users and AI systems find documents by exact terms and by meaning. Start with reciprocal rank fusion, apply the same filters to both searches, evaluate against real queries and add reranking only where measurements show it pays.
.wrk builds search and retrieval systems for companies in the US and Europe, including hybrid search on OpenSearch and PostgreSQL and retrieval for AI applications.
Want search that understands what users mean and still finds exact terms? Tell us about your content and queries, and we will propose a hybrid search design.
Explore AI services