Skip to content

qdrant/webinar-elastic-qdrant-ecommerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elastic + Qdrant Hybrid Search Demo

A demo application showcasing hybrid search for e-commerce by combining Elasticsearch (keyword/BM25 search) with Qdrant (vector/semantic search). Uses the H&M product dataset with pre-computed dense embeddings.

Architecture

  • Frontend: Next.js with React and Tailwind CSS
  • Backend: FastAPI (Python)
  • Search: Elasticsearch 9.0 + Qdrant
  • Embeddings: BAAI/bge-small-en-v1.5 (384 dimensions)

Quick Start

1. Start the services

docker compose --profile debug up --build

This starts:

  • Elasticsearch (port 9200)
  • Kibana (port 5601) - for debugging/visualization
  • Qdrant (port 6333)
  • Backend API (port 8000)
  • Frontend (port 3000)

Note: Omit --profile debug if you don't need Kibana.

2. Load data into Elasticsearch

Once the services are healthy, load the product data:

cd scripts
pip install elasticsearch polars
python load_elastic.py

The script will download the H&M product dataset from Hugging Face and index it into Elasticsearch.

3. Migrate vectors to Qdrant (optional)

To enable joint search mode (ES + Qdrant with RRF fusion):

export ES_HOST=http://localhost:9200
export ES_USERNAME=elastic
export ES_PASSWORD=changeme

./scripts/migrate_dense_vectors_to_qdrant.sh

4. Use the app

Open http://localhost:3000 and search for products.

Search Modes

  • Elasticsearch: Hybrid search combining BM25 keyword matching with dense vector similarity
  • Joint: Queries both Elasticsearch and Qdrant, merges results using Reciprocal Rank Fusion (RRF)

Environment Variables

Variable Default Description
ES_PASSWORD changeme Elasticsearch password
ES_VERSION 9.0.0 Elasticsearch/Kibana version
ES_API_KEY - Optional API key for ES auth
QDRANT_API_KEY - Optional API key for Qdrant

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors