Hybrid Search — Where Keywords Meet Vectors, Enabling Classifieds Discovery

Inês Soveral9 Sep 2025

Problem

OLX search matched query words against ad titles and descriptions with BM25 in SOLR. Ads are user-written, so vague, misspelled or differently phrased queries often return few results or a zero-results page (ZRP). A chain of fallback steps ("extensions") patched these cases but grew too complex to improve. The team wanted more recall and fewer ZRPs, and more seller contacts, without losing exact matching.

Example from the article: for the query "golden retriever adoption", control shows "No results" and unrelated ads (a kangaroo toy, bed sheets). With the vector step in the fallback chain, the results are golden retriever listings.

Solution in brief

Keep keyword retrieval and add a fixed number of nearest ads from a multilingual text embedding model. Merge both sets into the same 1,000-ad candidate list and rank them with the existing learning-to-rank (LTR) model, retrained with the query-ad vector similarity as a feature. A temporary linear re-ranker first collects the interaction data this needs.

Questions this case answers
  • How to add embedding-based retrieval to an existing lexical search stack and rank both candidate sources in one list
  • How to bootstrap a ranking model for a new candidate source that has no logged user interactions
  • How to add semantic vector retrieval to a keyword search without losing precision?
  • How to reduce zero-result pages in a marketplace search with user-written listings?

Tools and methods

  • BM25 in SOLR — existing keyword retrieval, still most of the candidates
  • multilingual-e5-small — embeds queries and ad titles plus descriptions (up to 512 tokens), no fine-tuning
  • mCLIP text encoder — first embedding model, titles only (77-token limit), used in the extension experiment
  • XGBoost LTR — final ranking, trained on seller-contact events
  • Linear re-ranking — Edismax-style weighted sum, a stopgap to collect vector-result interactions
Continue reading — it's free

Google or a one-time email code. No password.