Lexical and semantic components
OpenSearch supports keyword-based retrieval through BM25, a probabilistic scoring algorithm used by default and applied in queries such as multi_match, range and term. BM25 supports field-level boosting and flexible matching. Semantic search uses dense vector embeddings to represent documents and queries in a high-dimensional space, stored as dense vector fields and searched with k-nearest neighbour algorithms using similarity metrics such as inner product or cosine similarity. Hybrid search combines these approaches so that results reflect both keyword relevance and semantic meaning.
- BM25 as the default lexical scoring algorithm
- Dense vector embeddings for semantic matching
- k-NN retrieval with a configurable k parameter
- Neural query clause for embedding-based search
Rank normalization
Because sub-queries produce scores on different scales, hybrid search applies rank normalization to bring them onto a common scale before combination. OpenSearch distinguishes score-based normalization, which manipulates raw scores directly, from rank-based normalization, which works on the relative order of results. Documented score-based techniques include min-max normalization, L2 normalization and z-score normalization; reciprocal rank fusion is the rank-based option. Without normalization, one scoring method can overshadow the others and skew the final ranking.
- Min-max normalization (default score-based technique)
- L2 normalization
- Z-score normalization
- Reciprocal rank fusion (RRF)
Z-score normalization
Z-score normalization, also known as standardisation, scales data using the mean and standard deviation, with the formula Z = (X – μ) / σ. It was added in OpenSearch 3.0-beta1 as an alternative to min-max normalization, which does not handle outliers well. OpenSearch guidance suggests min-max when top-k results are closely clustered, and z-score when results are more evenly distributed and resemble a normal distribution. The technique is applied by creating a search pipeline with a normalization-processor set to z_score and applying that pipeline to a hybrid query.
- Added in OpenSearch 3.0-beta1
- Configured via a search pipeline normalization-processor
- Benchmarked against min-max on NDCG and latency
Sorting in hybrid queries
Hybrid queries did not initially support custom sort conditions; sorting was added in OpenSearch 2.16. Sub-query results are sorted at shard level according to the specified criteria, then merged at the coordinator level so the final output follows the requested sort order rather than relying solely on relevance scores. Query execution is divided into a query phase, which collects document IDs and scores from each shard, and a fetch phase, which retrieves the document contents. Documented limitations include the inability to include _score when sorting by multiple fields, and incompatibility with track_scores.
- Sorting capability added in OpenSearch 2.16
- Shard-level sorting followed by coordinator-level merge
- Multi-field sorting cannot include _score
- Not compatible with track_scores
Pagination with pagination_depth
OpenSearch 2.19 introduced pagination support for hybrid queries through the pagination_depth parameter, used alongside the traditional from and size parameters. The parameter sets the maximum number of results retrieved from each shard for every sub-query, controlling how many results are hybridised. In the documented example, an index with three shards and two sub-queries with pagination_depth = 20 sends 120 results to the coordinator node, where normalization, score combination and duplicate merging occur before trimming to the requested page. OpenSearch supports four pagination techniques overall.
- pagination_depth introduced in OpenSearch 2.19
- Works with from and size parameters
- Duplicates across sub-queries merged into a single result
- Other techniques: scroll, search_after, Point in Time with search_after
Performance improvements
OpenSearch has made successive performance enhancements to hybrid queries since their introduction in 2.10. In version 2.15, hybrid query performance improved by up to 70% compared with version 2.13. The changes included making scoring logic conditional so unnecessary computations are skipped, replacing Java Streams constructs with for loops and other efficient alternatives, eliminating unnecessary calculations such as query object hash codes, and optimising data structures including priority queues.
- Up to 70% improvement in 2.15 over 2.13
- Conditional scoring logic (around 20% faster query processing)
- Java Streams replaced with more efficient constructs (up to 25% gain)
- Removal of redundant hash code calculations
Building a hybrid search application
OpenSearch can act as a vector database alongside its traditional relevance features, allowing keyword and semantic retrieval to be combined in a single application. A published walkthrough uses a public recipe dataset from Kaggle, Cohere embeddings and an OpenSearch 2.17 cluster, with the accompanying code available on GitHub. Index preparation involves enabling index.knn and configuring parameters such as ef_construction, m, ef_search and space_type. Choice of embedding model affects search quality and system performance, with considerations including pricing, supported languages, input size limits and output vector size.
- Requires a Kaggle account and API token
- Requires a Cohere account and API token
- Requires an OpenSearch 2.17 cluster
- k-NN index settings: index.knn, ef_construction, m, ef_search, space_type
Relationship to neural sparse search
Neural sparse search is a separate semantic retrieval method in OpenSearch, introduced in version 2.11. Sparse encoding models encode text into (token, weight) entries, allowing OpenSearch to build indexes and run searches using Lucene's inverted index, and the method generalises well in out-of-domain scenarios. The v2 series models include a v2-distill model, which reduces parameters by 50% and supports both doc-only and bi-encoder modes, and a v2-mini model, which reduces parameters by 75% and supports doc-only mode. All v2 models are available in OpenSearch and on Hugging Face.
- Neural sparse search introduced in OpenSearch 2.11
- v2-distill: 67M parameters, doc-only and bi-encoder modes
- v2-mini: 23M parameters, doc-only mode
- Models distributed via OpenSearch and Hugging Face
Sources
-
Recipes to vectors: Building a hybrid search app with OpenSearch - OpenSearch https://opensearch.org/blog/recipes-to-vectors-building-a-hybrid-search-app-with-opensearch/ Verified 01 Nov 2026
-
Introducing the z-score normalization technique for hybrid search - OpenSearch https://opensearch.org/blog/introducing-the-z-score-normalization-technique-for-hybrid-search/ Verified 01 Nov 2026
-
Navigating pagination in hybrid queries with the pagination_depth parameter - OpenSearch https://opensearch.org/blog/navigating-pagination-in-hybrid-queries-with-the-pagination_depth-parameter/ Verified 01 Nov 2026
-
Building effective hybrid search in OpenSearch: Techniques and best practices - OpenSearch https://opensearch.org/blog/building-effective-hybrid-search-in-opensearch-techniques-and-best-practices/ Verified 01 Nov 2026
-
An overview of rank normalization in hybrid search - OpenSearch https://opensearch.org/blog/how-does-the-rank-normalization-work-in-hybrid-search/ Verified 01 Nov 2026
-
How sorting works in hybrid queries - OpenSearch https://opensearch.org/blog/internal-functioning-of-sorting-in-hybrid-query/ Verified 01 Nov 2026
-
Improving search efficiency and accuracy with the newest v2 neural sparse models - OpenSearch https://opensearch.org/blog/neural-sparse-v2-models/ Verified 01 Nov 2026
-
Boosting Hybrid query performance in OpenSearch 2.15 - OpenSearch https://opensearch.org/blog/performance-improvment-hybrid-query-215/ Verified 01 Nov 2026
Last verified 01 Nov 2026. This entry is compiled from the public web pages listed above. Nothing here is stated that those pages do not, and each of them was read on the date shown.