Building Hybrid Search Apps with Redis

March 9, 2026 Β· View on GitHub

License: MIT Java 21+ Spring Boot Redis Query Engine Redis OM Spring

🌟 Overview

Welcome to this hands-on workshop where you'll design and implement modern search experiences with Redis. You start with a working HTML/JS + Spring Boot app that implements hybrid search manually and with an empty Redis database, and evolve it step by step into a production-style hybrid search flow. In this workshop, you will learn how to efficiently load JSON data into Redis, create field embeddings, leverage Redis's native hybrid search support, and implement the cache aside pattern for query reuse.

Search quality drops when you disregard design principles like:

  • Full-text search alone can miss intent when wording changes even minimally
  • Vector search alone can return semantically related but lexically weak matches
  • App-side hybrid search logic can increase complexity and latency

Hybrid search lets you combine lexical precision and semantic relevance in one retrieval flow.

🎯 What You'll Build

By the end of this workshop, you'll build a complete Redis-powered search app with:

  • Support for typed queries with Redis OM for Spring
  • Redis JSON document data loading, modeling, and indexing
  • Native Redis hybrid search implemented with Spring Boot
  • Startup embedding regeneration for existing records
  • Prompt-embedding cache-aside via Keyword documents

πŸ“‹ Prerequisites

Required knowledge

  • Basic Java and Spring Boot familiarity
  • Basic understanding of search concepts
  • Familiarity with command-line tools
  • Basic understanding of Docker and Git

Required software

Option 1: GitHub Codespaces

  • GitHub account
  • Access to GitHub Codespaces (quota/billing enabled)
  • Browser or VS Code with Codespaces support

Option 2: Dev Containers locally

Option 3: Local development

Required accounts

No paid account is required for the core workshop flow. Everything can run locally with Docker.

πŸ—ΊοΈ Workshop Structure

This workshop has an estimated duration of 1.5 hours and is organized into 5 progressive labs, each building on the previous one. Each lab introduces a specific technical challenge, which is then addressed in the subsequent lab.

LabTopicDurationBranch
1Get the Search Up and Running20 minslab-1-starter
2Importing Data into Redis10 minslab-2-starter
3Implementing Embedding Creation25 minslab-3-starter
4Implementing Native Hybrid Search25 minslab-4-starter
5Caching Prompt Embedding10 minslab-5-starter

Each lab also contains a corresponding lab-X-solution branch with the completed code for reference. You can use this branch to compare your current implementation using git diff {lab-X-solution}. Alternatively, you can switch to the solution branch at any time during the lab if you are falling behind or to get unstuck.

πŸš€ Getting Started

Step 1: Choose your setup option

Pick one of the setup options from the Prerequisites section:

  • GitHub Codespaces
  • Dev Containers locally
  • Local development

Step 2: Start your workspace

If you're using GitHub Codespaces:

  • Create a new Codespace for this repository new-codespace.png codespace-options.png

If you are using Dev Containers locally:

  • Clone the repository:
    git clone https://github.com/redis-developer/building-hybrid-search-apps-with-redis.git
    
  • Open the project in a Dev Container. The instructions for doing this vary by IDE. Follow the guides for either VS Code or IntelliJ IDEA.

If you're using Local development:

  • Clone the repository:
    git clone https://github.com/redis-developer/building-hybrid-search-apps-with-redis.git
    
  • Verify the installed tools
    java -version
    mvn -version
    docker --version
    git --version
    riot --version
    

Step 3: Proceed to Lab 1

You can now start the Lab 1: Get the Search Up and Running

git checkout lab-1-starter

Then follow the README instructions

πŸ“š Resources

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

πŸ‘₯ Maintainers

πŸ“„ License

This project is licensed under the MIT License.