Skip to content

Architecture Reference Blueprint

Enterprise Hybrid Search Engine: Dense Vector & BM25

Build an enterprise search engine that combines the semantic understanding of neural vectors with the exact-match precision of BM25 lexical search.

System Constraints

Non-Negotiable Architecture Constraints

Sub-50ms global query latency over catalogs of 10M+ documents
Equal accuracy on conceptual natural language queries and exact SKU/part number queries
Dynamic filtering on faceted metadata (price, category, availability, permissions)
Continuous real-time index synchronization with zero search downtime

Component Topology

System Components & Technologies

Modular subsystems designed with decoupled responsibilities, clear contracts, and scalable storage layers.

3D Isometric Architecture

Enterprise Hybrid Search Engine: Dense Vector & BM25 Stack Topology

Live Telemetry Active
Tier 1: SearchTier 2: DenseTier 3: LexicalTier 4: Reciprocal
01

Search Query Gateway

< 15ms
Role: Query intent classification, spelling correction, and parallel dispatchFastAPI / Rust API Gateway
02

Dense Vector Index

< 35ms
Role: Semantic meaning and synonym similarity searchQdrant / pgvector
03

Lexical Sparse Index

< 5ms
Role: Exact term matching, SKU lookups, and BM25 scoringOpenSearch / Typesense
04

Reciprocal Rank Fusion (RRF)

< 1ms
Role: Merging and normalizing dense and sparse ranking scoresRust Fusion Engine
Subsystem 01

Search Query Gateway

Query intent classification, spelling correction, and parallel dispatch

Production Stack:

FastAPI / Rust API Gateway

Subsystem 02

Dense Vector Index

Semantic meaning and synonym similarity search

Production Stack:

Qdrant / pgvector

Subsystem 03

Lexical Sparse Index

Exact term matching, SKU lookups, and BM25 scoring

Production Stack:

OpenSearch / Typesense

Subsystem 04

Reciprocal Rank Fusion (RRF)

Merging and normalizing dense and sparse ranking scores

Production Stack:

Rust Fusion Engine

Data Lifecycle

End-to-End Data Flow Sequence

1

User types search query into web UI; gateway generates embedding and extracts keyword tokens in parallel.

2

Gateway dispatches concurrent queries to Qdrant (dense vector search) and OpenSearch (BM25 lexical search).

3

Both engines return their top 50 scored candidate documents with metadata.

4

Reciprocal Rank Fusion (RRF) algorithm computes unified rank scores: RRF_Score = 1 / (60 + Rank_Vector) + 1 / (60 + Rank_BM25).

5

Merged, deduplicated results are formatted and returned to the client in < 35ms.

Reliability & Resilience

Failure modes & automated mitigations

Failure Mode 01

Vector Search Ignoring Exact SKU Queries

Mitigation Architecture

Query intent classifier detects alphanumeric codes and boosts BM25 weight to 100% for SKU patterns.

Failure Mode 02

High Latency Generating Query Embeddings

Mitigation Architecture

Deploy quantized embedding models (BGE-Small / MiniLM) on CPU/GPU inference nodes with 5ms latency.

Failure Mode 03

Out-of-Sync Document Deletions

Mitigation Architecture

Stream deletion events through Kafka, removing records atomically from both dense and sparse indexes simultaneously.

Architecture FAQs

Frequently asked blueprint questions

RRF is an algorithm that combines rankings from multiple search systems without requiring score normalization, giving robust search relevance across diverse query types.

Shoppers search both with conceptual phrases ('comfortable summer shoes') and exact product codes ('NIKE-AIR-90-RED'). Hybrid search solves both effortlessly.

Senior engineering teams that build for long-term production health

Schedule an architecture session to review your requirements, cloud budget, and implementation timeline.