Bistro Innovation LabsSearch & AI consulting · Berlin
External write-up

Building Vector Search in Chorus: a technical deep dive

How vector search was added to Chorus, the open-source e-commerce search reference stack: Solr dense-vector fields, CLIP and MiniLM embeddings, a FastAPI encoding service, Querqy-driven hybrid queries, and the caveats and gotchas along the way.

This write-up was first published at opensourceconnections.com. Below is a summary and what we would add today.

Originally published on the OpenSource Connections blog in March 2023, this is the follow-up to Revolutionizing E-commerce Search with Vectors and explains how vector search was actually built into Chorus, the open-source reference implementation of e-commerce search on Solr or Elasticsearch with Querqy, SMUI and Quepid.

What the article covers

The implementation follows the four steps from the first post. The dataset is the roughly 19,000-product Icecat catalogue already in Chorus. Two DenseVectorField fields were added to the Solr 9.1 schema: a 768-dimension field for image vectors from OpenAI's CLIP and a 384-dimension field for text vectors from MiniLM, both using cosine similarity with HNSW. An offline script encodes product title and brand plus the product image; a new FastAPI encoding service turns query text into a vector at request time, wired in through Solr paramsets and a Querqy embeddings rewriter. Two query models are supported: the vector as the main query (pure kNN) and the vector as a boost on the keyword query (hybrid).

A section on caveats is honest about the costs: off-the-shelf models carry bias and limited world knowledge and may need fine-tuning; every extra dimension costs index space and compute; data quality limits what embeddings can capture; GPUs and a scalable encoding service are new infrastructure that e-commerce teams did not previously need.

The implementation notes are the most useful part. CLIP's 77-token limit could not hold even one product field, which is why text moved to MiniLM. Smaller encoding batches cut processing time by a factor of ten. The FastAPI service stayed slow until OMP_NUM_THREADS=1 was set. The article closes with planned improvements (custom models, tunable hybrid search, merchandising rules, reranking) and answers two reader questions: which of the k nearest neighbours are worth showing, and how filters combine with vector retrieval.

What I would add today

Three years on, the hybrid-as-boost pattern described here has become the mainstream way to introduce vectors into an existing lexical engine, and most engines now ship native support for it. What has not changed is the discipline the article leans on: judge the results in Quepid before and after, because vectors change which queries fail rather than making failures disappear. I would also put more weight today on the "k results always come back" question; a similarity threshold tuned on judgments is the difference between a helpful fallback and a page of noise.

Vector search

Working on vector search?

We help teams choose, evaluate and operate vector search: embedding-model selection against your own judgments, vector database or engine choice (Vespa, Qdrant, Elasticsearch, OpenSearch), index and quantisation trade-offs, hybrid fusion, and multimodal retrieval such as ColPali. Tell us what you are building and we will say whether this is the kind of engagement we take on.