HybridRanking Explained: How RRF Combines Keyword and Vector Search
HybridRanking is the practice of merging keyword and semantic search results into one ranked list, most often with Reciprocal Rank Fusion. This guide explains why BM25 and KNN scores cannot be compared directly, how the RRF formula works, where a hybrid ranker runs in a search pipeline, and how to configure it with a worked Easysearch example.
View 2 referencesAllow the functional cookie to save your likes. Privacy details
What is HybridRanking?
HybridRanking is the step in a hybrid search system that merges results from multiple retrieval methods—typically BM25 keyword search and KNN vector search—into a single ordered list. It is also written as hybrid ranking or hybrid search ranking. The most common fusion method is Reciprocal Rank Fusion, shortened to RRF.
The need arises because keyword and semantic search find different things. Keyword matching hits exact product codes, proper names, and technical terms; vector search captures intent when the wording differs. Running only one method leaves a blind spot, but simply concatenation of two lists produces duplicates and unstable ordering.
HybridRanking resolves that by combining rankings with a defined rule. In systems such as INFINI Easysearch, the component is named hybrid_ranker_processor and runs as a search-phase results processor.
Why do keyword and vector scores need fusion?
Because their scores are on incompatible scales. A BM25 score and a cosine similarity from a KNN query have different ranges and distributions, so comparing them numerically is meaningless. A high BM25 value is not "twice as relevant" as a high vector value.
Normalization is one option, but each query can shift score distributions, which makes fixed thresholds fragile. RRF avoids the issue by ignoring raw scores entirely and using only the rank position of each document in each result list.
A document ranked first in keyword search and twentieth in vector search gets a different combined score from one ranked fifth in both. The rule is transparent, needs no training data, and handles any number of sub-queries.
How does the RRF formula work in HybridRanking?
RRF sums a reciprocal rank contribution from each result list. The formula published in the Easysearch documentation appears below. It ignores raw scores entirely and uses only each document's position in each list, which is why it works even when retrieval scores are not comparable. The constant controls how strongly early ranks are rewarded.
RRF(d) = Σᵢ 1 / (k + rᵢ(d))
Here rᵢ(d) is the rank of document d in the i-th sub-query result, and k is a smoothing constant with a default of 60. A document appearing high in several lists accumulates a larger score than one high in only one list.
The constant controls how sharply early ranks are rewarded. With the default of 60, the difference between rank 1 and rank 2 is small relative to the total score. Lower values such as 10 make top ranks much more dominant; higher values such as 100 flatten the distribution. This is the main tuning knob in a HybridRanking setup.
Because the calculation uses only ranks, RRF works even when one retriever returns scores you do not trust.
Where does HybridRanking run in a search pipeline?
In Easysearch, the hybrid ranker is a search-phase results processor that sits between the Query phase and the Fetch phase. By that point, each sub-query has produced its own candidate list, but final documents have not yet been retrieved in full.
A complete pipeline typically has three parts:
- Rewrite processors such as
semantic_query_enricher, which inject embedding-model information and turn the query text into a vector. - Phase results processors such as
hybrid_ranker_processor, which fuse the BM25 and KNN result lists with RRF. - Response processors such as
hybrid_score_explanation, which add an explanation of the combined score to the response.
This separation matters operationally: you can change the fusion method without touching query parsing or response formatting.
How do you configure HybridRanking in Easysearch?
The minimal configuration declares the processor inside a search pipeline, and the combination technique defaults to RRF. A fuller pipeline adds a semantic query enricher before retrieval and a score explanation processor afterward. The two JSON examples below show both forms, followed by the query that invokes the completed pipeline.
PUT /_search/pipeline/my_hybrid_pipeline
{
"phase_results_processors": [
{
"hybrid_ranker_processor": {
"tag": "ranker",
"description": "RRF hybrid ranking"
}
}
]
}
A full pipeline adds the semantic query enricher and a score explanation step:
PUT /_search/pipeline/full_hybrid_pipeline
{
"rewrite_processors": [
{
"semantic_query_enricher": {
"url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"vendor": "openai",
"api_key": "sk-xxxxxxxx",
"default_model_id": "text-embedding-v3"
}
}
],
"phase_results_processors": [
{
"hybrid_ranker_processor": {
"tag": "ranker",
"description": "HybridRanking with RRF",
"combination": { "technique": "rrf" }
}
}
],
"response_processors": [
{
"hybrid_score_explanation": {
"tag": "explanation",
"description": "Add hybrid score explanation"
}
}
]
}
Call it with GET /my_index/_search?search_pipeline=full_hybrid_pipeline and a hybrid query containing a match clause and a semantic clause. The pipeline then performs semantic enrichment, parallel BM25 and KNN retrieval, RRF fusion, and unified ranking.
What parameters can you tune in HybridRanking?
The documented request-body fields are deliberately few. They cover the fusion configuration, its technique and parameters, and two operational fields for identification and failure handling. The table below lists each field with its type, default, and purpose, so you can distinguish relevance controls from pipeline plumbing.
| Field | Type | Default | Purpose |
|---|---|---|---|
combination |
Object | — | Score fusion configuration |
combination.technique |
String | rrf |
Fusion algorithm name |
combination.parameters |
Object | — | Parameters for the chosen algorithm |
tag |
String | — | Processor identifier |
description |
String | — | Human-readable description |
ignore_failure |
Boolean | false |
Continue if this processor fails |
The rank constant lives under the technique's parameters and must be at least 1. The documentation notes that larger values make scores more uniform and reduce the influence of top-ranked results, while smaller values widen the gap between ranks.
Keep ignore_failure at its default unless you have a deliberate fallback. Silently continuing after fusion failure can return a list that looks ranked but is not.
What are the limits of HybridRanking?
RRF is robust but not universally optimal. It discards score magnitude, so a document that barely matches in one retriever and one that matches strongly receive contributions based only on position. If your retrievers produce well-calibrated scores, a learned or weighted fusion may do better.
There is also no cross-encoder in this stage. HybridRanking fuses first-stage candidates; it does not re-evaluate query-document relevance in depth. Many production systems add a semantic reranker after fusion for that purpose.
Finally, the documentation describes a specific implementation. Other search engines expose similar ideas under different names and field structures, so the JSON above is not portable without adaptation.
FAQ: HybridRanking questions
These answers separate hybrid search from the ranking stage that follows it, explain why scores are not simply added, describe the default smoothing constant, and state what fusion alone does not achieve. Each is grounded in the Easysearch documentation rather than in general claims about search relevance.
Not exactly. Hybrid search is the retrieval strategy that runs keyword and semantic queries together. HybridRanking is the fusion stage that turns the separate result lists into one ranked list.
Why not just add the two scores?
Because BM25 and vector similarity scores are not on comparable scales. RRF uses ranks instead of scores, which avoids arbitrary normalization.
What does the default constant 60 do?
It smooths reciprocal rank scores. Lower values make top-ranked documents dominate the fused list; higher values flatten differences between ranks.
Does HybridRanking improve relevance on its own?
It improves consistency across query types. For fine-grained relevance, a reranking stage after fusion is usually added.