LIVEΒ·The trends shaping tomorrow's world.
AI

Hybrid Search in Enterprise RAG

Hybrid search pairs BM25 keyword search with vector search. How RRF fusion works, how Elasticsearch, OpenSearch and Weaviate do it, and when to use it.

Hybrid search runs two kinds of retrieval on the same query, keyword search (usually BM25) and vector search over embeddings, and merges their result lists into one ranking. In enterprise RAG, it covers each method's blind spot: vectors find paraphrases and related concepts, while keywords catch exact product codes, error messages, names and acronyms. The most common way to merge the lists is Reciprocal Rank Fusion (RRF), a simple rank-based formula that major search engines now support out of the box.

Why one retriever isn't enough

Ask a support bot "Why does my order show error E-4012?" and two things need to happen. The system must match the literal string "E-4012," and it must understand that "order shows error" relates to documents titled "Checkout failures."

Keyword search does the first well. Vector search does the second well. Neither reliably does both.

The researchers behind Dense Passage Retrieval (DPR), one of the papers that launched modern vector retrieval, documented this split directly. They found BM25 is "sensitive to highly selective keywords and phrases," while their dense model "excels at semantic representation, but might lack sufficient capacity to represent salient phrases which appear rarely" [2]. On one dataset where questions shared many words with the passages, BM25 had a clear advantage [2].

Independent benchmarks point the same way. The BEIR benchmark, which tests retrieval across 18 datasets without task-specific training, called BM25 a "robust baseline" and found that dense retrievers often trailed other approaches on unfamiliar domains [8]. Enterprise content (internal jargon, SKUs, ticket IDs) is exactly that kind of unfamiliar domain.

The two retrieval paths

Keyword path: BM25

BM25 is a ranking function that grew out of the probabilistic relevance framework, which Stephen Robertson and Hugo Zaragoza describe as grounded in information retrieval research from the 1970s and 1980s [1]. It scores a document by summing a weight for each query term, combining three ideas [1]:

  • Term frequency, with saturation. More occurrences of a term raise the score, but with diminishing returns. A parameter called k1 controls how quickly it saturates.
  • Document length normalization. Long documents naturally contain more terms, so their scores are adjusted. A parameter called b controls how strongly (b = 0 switches it off).
  • Inverse document frequency. Rare terms count for more than common ones.

Robertson and Zaragoza report that experiments suggest values around 0.5 < b < 0.8 and 1.2 < k1 < 2 are "reasonably good in many circumstances," while noting that optimal values depend on the documents and queries [1]. BM25 runs on an inverted index, the same structure search engines have used for decades, so it is fast and well understood.

Vector path: dense retrieval

The vector path uses an embedding model to turn the query into a vector, then finds the nearest stored chunk vectors with an approximate nearest neighbor index such as HNSW. Our explainer on how vector databases work covers that machinery in detail.

DPR showed this path's strength: its dense retriever beat a strong Lucene BM25 system by 9 to 19 percentage points in top-20 passage retrieval accuracy on open-domain QA benchmarks [2].

How results get merged: fusion

The two paths produce scores on completely different scales. A BM25 score can be any positive number; a cosine similarity sits between -1 and 1. You can't simply add them. There are two main families of fixes.

Rank-based fusion: Reciprocal Rank Fusion (RRF)

RRF ignores raw scores and uses only each document's position in each list. It was introduced by Gordon Cormack, Charles Clarke and Stefan BΓΌttcher at SIGIR 2009 [3]. For every document, add up one over (k plus its rank) across all the result lists it appears in:

RRF score(d) = Ξ£ 1 / (k + rank of d in each list)

The authors fixed k = 60 during a pilot study. Their tests showed k = 60 was near-optimal "but that the choice was not critical" [3]. The constant softens the influence of a single system ranking a document at the very top. Across their pilot and TREC experiments, RRF beat Condorcet Fuse, CombMNZ and the best individual system by 4% to 5% on average, using the MAP metric [3].

A worked example (illustrative ranks, k = 60):

Document

BM25 rank

Vector rank

RRF score

A

1

4

1/61 + 1/64 β‰ˆ 0.0320

C

5

1

1/65 + 1/61 β‰ˆ 0.0318

B

2

not returned

1/62 β‰ˆ 0.0161

D

not returned

2

1/62 β‰ˆ 0.0161

Documents that both retrievers found (A and C) rise above documents that only one retriever ranked highly. That is the behavior you usually want: agreement between two very different methods is a strong relevance signal.

RRF's appeal is practical. It needs no training data, no score calibration and only one parameter. Elasticsearch's documentation uses the same formula, with rank_constant defaulting to 60 and rank_window_size controlling how many results from each retriever enter the fusion [4].

Score-based fusion: normalize, then combine

The alternative is to rescale each list's scores to a common range and then take a weighted combination. This preserves information RRF throws away: how much better the top hit was than the second.

  • OpenSearch supports both approaches. Score-based fusion offers min_max, l2 and z_score normalization with combination methods such as arithmetic_mean; rank-based fusion uses RRF [5].
  • Weaviate uses an alpha parameter to weight the two paths: an alpha of 1 is pure vector search and 0 is pure keyword search. As of version 1.24, its default fusion method is Relative Score Fusion, which works on normalized scores; Ranked Fusion is the rank-based alternative [6].
  • DPR's hybrid used a simple linear combination, BM25 score plus 1.1 times the dense similarity, with the weight tuned on a development set [2].

Score-based fusion can outperform RRF when tuned, but the tuning is the cost. Weights that suit one corpus may not suit another.

RRF vs score-based fusion


Rank-based (RRF)

Score-based (normalized)

Needs tuning

Barely (k; default 60) [3][4]

Yes (normalization method, weights)

Uses score margins

No

Yes

Robust to score scale changes

Yes

Depends on normalization

Good default for

Getting started, mixed sources

Mature systems with evaluation data

Adding a reranker

Fusion produces a better candidate list, but it is still a list built from cheap first-stage signals. Many production systems add a reranker, typically a cross-encoder that reads the query and each candidate passage together and outputs a relevance score. Elastic describes this as a step that "makes sense on a small top-k result set, as one of the final steps in a pipeline" [10]. Our reranking explainer covers how these models work.

Anthropic's Contextual Retrieval evaluation shows how the layers stack. Starting from embeddings alone, adding contextual BM25 (a hybrid) cut the top-20 retrieval failure rate by 49%, and adding a reranker on top raised the reduction to 67% [9]. Those are vendor-reported figures on Anthropic's chosen datasets, but the pattern of each stage adding value is consistent with the BEIR finding that reranking models achieved the best zero-shot results, at higher computational cost [8].

How major platforms implement hybrid search

As of November 2026:

Platform

Keyword side

Vector side

Fusion options

Elasticsearch

BM25 via standard retriever

knn retriever

RRF retriever (needs two or more child retrievers); also linear retrievers [4][10]

OpenSearch

Keyword query clause inside a hybrid query

Vector query clause in the same hybrid query

Normalization processor (score-based) or score ranker processor (RRF); hybrid search introduced in 2.11 [5]

Weaviate

BM25F

Built-in vector index

Relative Score Fusion (default since v1.24) or Ranked Fusion; alpha weighting [6]

PostgreSQL + pgvector

Postgres full-text search

pgvector (HNSW or IVFFlat)

Do it in SQL or app code; pgvector's README suggests RRF or a cross-encoder [7]

Elasticsearch notes that its RRF retriever does not support scroll, sort or rescore [4]. Platform details change between versions, so check the docs for the release you run.

Enterprise considerations

Permissions belong in both paths. If a user can't read a document, it must be filtered out of both the keyword and vector results before fusion. Filtering after fusion can leak titles or snippets, and can leave you with too few results.

Analyzers matter for the keyword path. Tokenization decides whether "E-4012" is one term or two, and whether "running" matches "run." Test your analyzer on real identifiers.

Keep both indexes in sync. A document updated in the keyword index but not re-embedded produces confusing results. Index both from the same pipeline and the same chunks.

Evaluate per query type. Hybrid search helps most on queries with exact identifiers and least on purely conceptual questions. Slice your evaluation set so a gain on one type doesn't hide a loss on another.

Log which path found each result. It makes debugging much easier when someone asks why a document ranked first.

How to decide if you need hybrid search

You likely benefit if:

  • Users search for codes, SKUs, error strings, legal citations or people's names.
  • Your content has domain jargon that general embedding models may not know well [8].
  • You already see vector search miss documents that contain the exact words in the query.

You might skip it, at least initially, if:

  • Queries are conversational and conceptual, and content is general prose.
  • Your platform makes a second index expensive to maintain.

A sensible path: start with RRF at default settings, measure recall on a labeled query set, then decide whether score-based tuning or a reranker earns its added complexity.

Outlook

Hybrid retrieval has moved from a research trick to a default feature: Elasticsearch, OpenSearch and Weaviate all ship native fusion as of November 2026 [4][5][6]. The open questions are now about tuning and layering, such as when to switch from RRF to weighted fusion and how many candidates to pass to a reranker, rather than whether to combine keyword and vector search at all.

Frequently asked questions

What is the difference between hybrid search and semantic search?

Semantic search usually means vector search alone, matching on meaning. Hybrid search runs semantic and keyword search together and merges the results, so exact-term matches aren't lost.

Why is k set to 60 in Reciprocal Rank Fusion?

The original RRF authors fixed k = 60 in a pilot study and found it near-optimal, though the exact choice was not critical [3]. Elasticsearch uses 60 as the default rank_constant [4]. A larger k flattens the advantage of top-ranked results.

Is BM25 still relevant with modern embeddings?

Yes. Benchmarks like BEIR found BM25 a robust baseline across domains [8], and DPR's authors showed it catches rare, selective keywords that dense models can miss [2]. That's why hybrid search keeps it.

Does hybrid search replace a reranker?

No, they solve different problems. Hybrid search improves which candidates you retrieve; a reranker reorders a short candidate list more accurately. Many systems use both [9][10].

Can I do hybrid search in PostgreSQL?

Yes. Combine Postgres full-text search with pgvector similarity search and merge the results with RRF or a cross-encoder, as the pgvector README suggests [7].

Sources

  1. Robertson, S. and Zaragoza, H. "The Probabilistic Relevance Framework: BM25 and Beyond." Foundations and Trends in Information Retrieval 3(4), 2009. https://www.staff.city.ac.uk/~sbrp622/papers/foundations_bm25_review.pdf
  2. Karpukhin, V. et al. "Dense Passage Retrieval for Open-Domain Question Answering." EMNLP 2020. https://arxiv.org/abs/2004.04906
  3. Cormack, G. V., Clarke, C. L. A. and BΓΌttcher, S. "Reciprocal Rank Fusion outperforms Condorcet and individual Rank Learning Methods." SIGIR 2009. https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf
  4. Elastic. "Reciprocal rank fusion." https://www.elastic.co/docs/reference/elasticsearch/rest-apis/reciprocal-rank-fusion
  5. OpenSearch. "Hybrid search." https://docs.opensearch.org/latest/vector-search/ai-search/hybrid-search/index/
  6. Weaviate. "Hybrid search." https://docs.weaviate.io/weaviate/search/hybrid
  7. pgvector. README. https://github.com/pgvector/pgvector
  8. Thakur, N. et al. "BEIR: A Heterogenous Benchmark for Zero-shot Evaluation of Information Retrieval Models." NeurIPS 2021 Datasets and Benchmarks. https://arxiv.org/abs/2104.08663
  9. Anthropic. "Introducing Contextual Retrieval." September 2024. https://www.anthropic.com/news/contextual-retrieval
  10. Elastic. "Semantic reranking." https://www.elastic.co/docs/solutions/search/ranking/semantic-reranking