Close Menu
geekfence.comgeekfence.com
    What's Hot

    Meta Ran Ads That Contained AI-Generated Child Sexual Abuse Imagery

    August 5, 2026

    A verifiable autonomous research framework via Chain-of-Evidence

    August 5, 2026

    Transforming search at Delivery Hero: A migration journey to OpenSearch Service with radial search

    August 5, 2026
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    Facebook Instagram
    geekfence.comgeekfence.com
    • Home
    • UK Tech News
    • AI
    • Big Data
    • Cyber Security
      • Cloud Computing
      • iOS Development
    • IoT
    • Mobile
    • Software
      • Software Development
      • Software Engineering
    • Technology
      • Green Technology
      • Nanotechnology
    • Telecom
    geekfence.comgeekfence.com
    Home»Big Data»Transforming search at Delivery Hero: A migration journey to OpenSearch Service with radial search
    Big Data

    Transforming search at Delivery Hero: A migration journey to OpenSearch Service with radial search

    AdminBy AdminAugust 5, 2026No Comments11 Mins Read0 Views
    Facebook Twitter Pinterest LinkedIn Telegram Tumblr Email
    Transforming search at Delivery Hero: A migration journey to OpenSearch Service with radial search
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Have you ever searched for something like “low fat yogurt” at any online grocery store and noticed how the results seem to understand what you mean? Instead of only showing items with an exact match, the top-ranked products are often semantically related. You might see items like “Greek yogurt” or “yogurt with 0.5% fat,” even when only one word matches lexically. This is the power of semantic search, and when combined with traditional lexical search, it creates a hybrid search experience that delivers both precision and recall.

    Semantic search returning products semantically related to a low fat yogurt query

    At Delivery Hero, one of the world’s leading online food delivery platforms, the search team has been using semantic search for grocery verticals since 2024. What started as a proof-of-concept has evolved into a production-grade hybrid search system powered by Amazon OpenSearch Service. This system combines radial vector search with lexical retrieval to deliver highly relevant product results at scale.

    In this post, we walk through how Delivery Hero migrated their semantic search infrastructure to Amazon OpenSearch Service, why they chose radial search over traditional k-nearest neighbor (k-NN) search, and the optimizations that made the system fast, cost-effective, and flexible for experimentation.

    Legacy system overview

    The original semantic search system was built as a standalone service using SpringBoot and Apache Lucene 9.9, deployed on Kubernetes. The retrieval flow worked as follows:

    1. A user starts a search on the application.
    2. The semantic search system retrieves the top 50 nearest-neighbor candidates from a static in-memory Lucene index.
    3. These candidates passed through a filtering layer to remove out-of-stock items.
    4. The filtered semantic results were merged with a parallel set of lexical search results.
    5. A final ranking step combined both candidate sets to produce the response.

    The team iterated on this system over seven versions and conducted multiple A/B tests to refine the approach. The initial system performed well, however as the business scaled, several pain points emerged:

    • Scalability limitations: Running vector indices as static, in-memory structures inside Kubernetes pods meant that scaling required provisioning larger pods or adding replicas. Both options were expensive and operationally complex.
    • Multi-model experimentation was difficult: Running A/B/C tests with three different product embedding model variants required fitting all models within a Kubernetes stateless workload. This created memory pressure and complicated deployment pipelines.
    • Operational overhead: Managing index builds, deployments, and version rollouts for a custom Lucene-based service required significant engineering effort compared to a managed service.

    Architecture modernization with OpenSearch Service

    By the end of 2025, Delivery Hero had migrated their entire search infrastructure from self-managed Elasticsearch 7.x on Google Kubernetes Engine (GKE) to the fully managed Amazon OpenSearch Service 3.x. This migration created a natural opportunity to consolidate the legacy semantic search service into OpenSearch as well.

    The new architecture separates concerns into two distinct pipelines: an ingestion pipeline for indexing product embeddings, and an inference pipeline for real-time hybrid retrieval.

    Ingestion pipeline

    For the ingestion pipeline, Delivery Hero chose Amazon OpenSearch Ingestion (OSIS) to sync product embedding data from Amazon Simple Storage Service (Amazon S3) to the OpenSearch domain.

    Ingestion pipeline syncing product embeddings from Amazon S3 to Amazon OpenSearch Service through OpenSearch Ingestion

    The flow works as follows:

    1. ML model
    2. Airflow job: An existing Apache Airflow job periodically generates product embeddings using an external machine learning (ML) model and periodically dumps the results (product parent ID + embedding vector) to an S3 bucket.
    3. OpenSearch Ingestion pipeline: An OpenSearch Ingestion pipeline is configured with a scheduled S3 scan that performs a nightly scan from S3 and updates the new k-NN index in OpenSearch Service.
    version: '2'
    embedding-pipeline:
      source:
        s3:
          acknowledgments: true
          scan:
            buckets:
              - bucket:
                  name: my-bucket-name
                  filter:
                    include_prefix:
                      - vector-search/json-index/latest
            range: PT24H
            scheduling:
              interval: PT24H
          aws:
            region: eu-central-1
            sts_role_arn: arn:aws:iam:::role/osis-pipeline-role
          codec:
            ndjson: {}
          compression: none
      workers: '1'
      sink:
        - opensearch:
            hosts:
              - "https://..es.amazonaws.com"
            aws:
              serverless: false
              region: eu-central-1
              sts_role_arn: arn:aws:iam:::role/search-xxx
            index_type: custom
            index: emb_products_v1
            template_content: ...
            template_type: index-template
            routing: '${global_entity_id}'
            document_id: '${global_entity_id}:${master_code}'
            max_retries: '3'

    Because the index stores product parent IDs and embeddings are regenerated in batch, there is no need for real-time updates. This allows the team to refresh and force-merge the index once per day, resulting in highly optimized segment structures and fast retrieval speeds (p99 < 35 ms during peak hours).

    Setting up the OSIS pipeline required only a few lines of Terraform, making it straightforward to provision and maintain as infrastructure-as-code.

    Inference pipeline

    On the retrieval side, the system runs a hybrid search strategy that combines radial vector search with lexical search in parallel:

    Hybrid inference pipeline running radial vector search and lexical search in parallel before merging and re-ranking results

    1. Query embedding: A user’s search query first reaches the Query Understanding (QU) service, where it is encoded into an embedding using the same live ML model employed for product embeddings. To optimize performance, embeddings for top queries are cached.
    2. Parallel lexical and semantic retrieval:
      • A radial k-NN search runs against the product embeddings index using min_score to retrieve all semantically similar products above a similarity threshold.
      • A lexical BM25 search runs against the product catalog index.
        Chart comparing p95 OpenSearch take-time for lexical and semantic search

        Comparing p95 OpenSearch time for both lexical and semantic search.

    1. ID resolution and inventory filter: Because the k-NN index stores product parent IDs, a resolution step maps these to individual product IDs via a secondary index that maintains near real-time inventory updates. This approach satisfies two key business requirements within a single retrieval call: product-id resolution and real-time availability filtering.
    2. Merge and re-rank: A custom post-processing step combines results from both lexical and radial search, applies re-ranking logic, and returns the final result set.

    Why radial search?

    Traditional k-NN search in OpenSearch uses a top-k approach: you ask for the k nearest neighbors, and you get exactly k results regardless of how similar they actually are. This works well for many use cases, but it has a fundamental limitation for product search. It always returns a fixed number of results, even when some of those results are not semantically relevant.

    Radial search solves this by flipping the paradigm. Instead of asking “give me the 50 closest items,” you ask “give me all items that are at least this similar.” This is done using the min_score parameter in the k-NN query:

    GET product-embeddings/_search
    {
      "query": {
        "knn": {
          "embedding": {
            "vector": [0.12, 0.45, 0.78, ...],
            "min_score": 0.72
          }
        }
      }
    }

    When using radial search with cosine similarity as the space type, OpenSearch normalizes scores using the related formula (score = (1 + cosine_similarity) / 2), as documented in the OpenSearch knn-spaces reference.

    This means a min_score of 0.72 in the query example, does not directly correspond to cosine similarity. Instead, 0.72 is the normalized OpenSearch score which translates to 44% cosine similarity (that is, cosine_similarity = 2 × 0.72 – 1 = 0.44).

    If you need results with at least 90% cosine similarity, apply the formula:

    min_score = (1 + 0.90) / 2 = 0.95. So, you would set “min_score”: 0.95 in your query.

    This approach offers several advantages for product search:

    • Quality over quantity: Low-relevance results are excluded at the retrieval stage rather than relying on downstream re-ranking to filter them out.
    • Variable result set size: The system naturally adapts to query specificity. Niche queries return fewer, more precise results. Broad queries return more candidates for the re-ranker to work with. For example, a highly specific query like “Oatly oat milk barista edition” might return 5 results, while a broader query like “milk” might return 200.
    • Better recall-precision trade-off: By tuning the min_score threshold, the team can directly control the balance between returning too many irrelevant results and missing relevant ones.

    How Delivery Hero selected the threshold for radial search

    Choosing the right min_score threshold is important. Set it too high and you miss relevant products. Set it too low and you flood the re-ranker with noise.

    Delivery Hero approaches threshold selection through systematic experimentation. To achieve optimal precision across diverse markets, a tailored min_score threshold is assigned to each country and query type. These thresholds are meticulously determined through rigorous offline evaluations, which use historical user interaction and manually labeled data to establish a rough estimate. This initial estimate is then further refined and validated through a series of live A/B experiments.

    Evaluation of the new search system

    One of the key advantages of the new architecture is how naturally it supports experimentation. At Delivery Hero, we store three variants of product embeddings within a single document:

    PUT product-embeddings/_doc/1?routing=FP_DE
    {
      "master_product_code": "abc123",
      "embedding_variant_1": [0.12, 0.45, 0.78, ...],
      "embedding_variant_2": [0.21, 0.4, 0.98, ...],
      "embedding_variant_3": [0.13, 0.65, 0.58, ...],
      "global_entity_id": "FP_DE"
    }

    In this example, embedding_variant_1, embedding_variant_2, and embedding_variant_3 are generated from three different models for A/B/C testing. After each test, the winning variant is designated as the control, while the other two are replaced with new models for further experimentation. With this approach, the team can iterate continuously while maintaining constant space complexity.

    Optimizations of large scale production system

    Engine upgrade: OpenSearch 2.17 to 3.3

    Production k-NN query latency metrics from one of the busiest countries after the OpenSearch 3.3 upgrade

    Production metrics from one of the busiest countries.

    OpenSearch 3.x introduced significant performance improvements for vector search workloads. Post-upgrade to OpenSearch 3.3, we observed a ~18% reduction in p95 latency for k-NN queries.

    For Delivery Hero’s use case, the k-NN search latency was already very low on OpenSearch 2.17 (p99 of 20–30 ms), which meant the upgrade to 3.3 was not strictly necessary for all clusters. The cluster serving the control group in A/B tests still runs on OpenSearch 2.17.

    Shard routing

    To minimize cross-shard overhead during k-NN queries, Delivery Hero implemented custom shard routing based on geographic market. Because each market (for example, Germany, Sweden, and Finland) has its own product catalog, routing queries to market-specific shards avoids unnecessary fan-out across the entire index.

    This is an example of how to configure routing at index time and search time using the _routing field:

    PUT product-embeddings/_doc/1?routing=FP_DE
    {
      "master_product_code": "abc123",
      "embedding_variant_1": [0.12, 0.45, 0.78, ...],
      "embedding_variant_2": [0.21, 0.4, 0.98, ...],
      "embedding_variant_3": [0.13, 0.65, 0.58, ...],
      "global_entity_id": "FP_DE"
    }

    And at query time:

    GET product-embeddings/_search?routing=FP_DE
    {
      "query": {
        "knn": {
          "embedding_variant_2": {
            "vector": [0.12, 0.45, 0.78, ...],
            "min_score": 0.72
          }
        }
      }
    }

    This ensures that a query for the German market only hits shards containing German products, reducing latency and compute overhead.

    Refresh interval

    Because the product embedding index is updated only once per day via the OSIS batch pipeline, there is no need for the default 1-second refresh interval. Delivery Hero configured the index with a longer refresh interval during ingestion and triggers a manual refresh + force merge after the nightly batch completes.

    Impact on the business

    The migration from self-managed Lucene on Kubernetes to Amazon OpenSearch Service achieved a ~50% reduction in p95 latency, dropping response times from a variable 200ms+ to a stable 100ms baseline. This transition significantly improved system consistency by eliminating the high variance and rhythmic latency spikes seen in the previous architecture.

    End-to-end service latency dropping to a stable 100 ms baseline after rolling out semantic search on OpenSearch for foodpanda and yemeksepeti

    End service latency after rolling out semantic search with OpenSearch for foodpanda and yemeksepeti.

    Beyond raw latency, the operational benefits were significant:

    • Reduced infrastructure complexity: Eliminating the standalone Lucene service removed an entire deployment pipeline, monitoring stack, and on-call rotation.
    • Faster experimentation: New embedding models can be tested by creating a new index and adjusting query routing, without requiring code deployments.
    • Cost efficiency: Using OpenSearch’s managed infrastructure and the batch ingestion pattern (refresh once per day) reduced compute costs compared to running always-on Kubernetes pods with in-memory indices.

    Conclusion

    By combining radial search with lexical retrieval, Delivery Hero’s team built a system that adapts dynamically to query intent. It returns precise results for specific queries and broader candidate sets for general ones.

    The migration to Amazon OpenSearch Service demonstrates how a managed search platform can simplify the operational complexity of vector search while improving performance.

    To get started with vector search on Amazon OpenSearch Service, see the AI search documentation and the OpenSearch radial search guide.


    About the authors

    Sayan Das

    Sayan Das

    Sayan is Staff Software Engineer at Delivery Hero specializing in high-performance search infrastructure and large-scale distributed systems. With a deep background in Big Data engineering and core search internals (Solr, Lucene, OpenSearch)

    Hajer Bouafif

    Hajer Bouafif

    Hajer is a senior solutions architect in Data Analytics and ML search with a background in Big Data engineering. Hajer provides organizations with best practices and well-architected reviews to build large-scale Machine Learning search solutions



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    Granular Usage Attribution for dbt Pipelines with Query Tags – Cloned

    August 4, 2026

    Evaluating Construction Scheduling Software for Better Data Visualization and Project Decisions

    August 3, 2026

    The Cyberbeveiligingswet Doesn’t Regulate Real Estate. It Doesn’t Have To  |

    August 2, 2026

    LanceDB Vector Database Guide: Features anndPython Demo

    August 1, 2026

    Lowering AWS KMS decrypt API costs in EMR Spark jobs

    July 30, 2026

    How NorthStar Anesthesia built a scheduling app for a workforce of 3,000 clinicians in weeks

    July 29, 2026
    Top Posts

    Understanding U-Net Architecture in Deep Learning

    November 25, 202571 Views

    The Next Paradigm in Efficient Inference Scaling – The Berkeley Artificial Intelligence Research Blog

    May 16, 202639 Views

    Hard-braking events as indicators of road segment crash risk

    January 14, 202634 Views
    Don't Miss

    Meta Ran Ads That Contained AI-Generated Child Sexual Abuse Imagery

    August 5, 2026

    Editor’s note: This article contains descriptions of imagery depicting child sexual abuse. Reader discretion is…

    A verifiable autonomous research framework via Chain-of-Evidence

    August 5, 2026

    Transforming search at Delivery Hero: A migration journey to OpenSearch Service with radial search

    August 5, 2026

    Your AI strategy needs a trusted ecosystem: Enter Cisco Compatible Solutions for AI

    August 5, 2026
    Stay In Touch
    • Facebook
    • Instagram
    About Us

    At GeekFence, we are a team of tech-enthusiasts, industry watchers and content creators who believe that technology isn’t just about gadgets—it’s about how innovation transforms our lives, work and society. We’ve come together to build a place where readers, thinkers and industry insiders can converge to explore what’s next in tech.

    Our Picks

    Meta Ran Ads That Contained AI-Generated Child Sexual Abuse Imagery

    August 5, 2026

    A verifiable autonomous research framework via Chain-of-Evidence

    August 5, 2026

    Subscribe to Updates

    Please enable JavaScript in your browser to complete this form.
    Loading
    • About Us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • Terms and Conditions
    © 2026 Geekfence.All Rigt Reserved.

    Type above and press Enter to search. Press Esc to cancel.