Two Complementary Search Approaches: Traditional + Vector Demonstrate Redis's versatility as both a traditional and vector DB.
- Setup: Movies + RediSearch indexes
- Capabilities: Field matching, ranges, sorting
- Example:
@genre:{Action} @rating:[8 +inf]
- Value: Redis as a powerful search database
Embedding-based semantic search - Natural language with HNSW vectors
- Setup: Movies + embeddings + vector index
- Capabilities: Semantic + Hybrid search
- Examples:
- Semantic:
space adventure with aliens
- Hybrid:
superhero movie | genre:Action year>2010
- Semantic:
- Value: Redis with vector semantic search!
src/core/
- Redis config, embeddings, index schemassrc/data/
- Data loading and index creationsrc/search/
- Traditional, semantic, and vector searchsrc/utils/
- As the name implies
git clone <repo>
cd redis-movie-search
pip3 install -r requirements.txt
# Configure Redis connection
cp .env.example .env
# Edit .env with your Redis credentials
python3 run.py setup
# Flow 1: Database syntax
python3 run.py search-basic
# Flow 2: Natural language
python3 run.py search-advanced
Traditional keyword syntax with precise field matching:
@genre:{Action} @rating:[8 +inf]
@title:star wars
@release_year:[2010 2020] SORTBY rating DESC
@genre:{Comedy} @rating:[7 10] LIMIT 0 5
Embedding-based semantic search with natural language queries:
Semantic (vector similarity):
space adventure with aliens
romantic comedy in Paris
movies about time travel
psychological thriller
Hybrid (vector + traditional filters):
superhero movie | genre:Action year>2010
comedy | rating>7.5 year>2015
space adventure | year<2000
- Python 3.8+
- Redis Stack (RediSearch + Vector support)
- 1GB RAM for embeddings