Skip to content

waleedzarrar/springboot-elasticsearch-course-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Course Search Application with Spring Boot and Elasticsearch

This project is a Spring Boot application demonstrating full-text search and autocomplete (suggestions) functionalities using Elasticsearch. It allows users to search for courses based on various criteria and get real-time suggestions as they type.

Table of Contents

Features

  • Full-Text Search: Search courses by keywords in titles and descriptions.
  • Filtered Search: Filter courses by category, type, minimum/maximum age, and price range.
  • Autocomplete Suggestions: Get real-time course title/keyword suggestions as you type using Elasticsearch's Completion Suggester.
  • Automatic Data Loading: On application startup, it automatically deletes the existing Elasticsearch index (if any), creates a new one with custom mappings/settings, and bulk indexes 50 randomly generated sample courses using JavaFaker.

Technologies Used

  • Java 21.0.4
  • Spring Boot 3.2.5
  • Elasticsearch 8.11.3
  • Elasticsearch Java API Client (co.elastic.clients)
  • Maven (for dependency management and build)
  • Lombok (for boilerplate code reduction)
  • JavaFaker 1.0.2 (for generating sample data)
  • Docker (for running Elasticsearch)

Prerequisites

Before running this application, ensure you have the following installed:

  • Java Development Kit (JDK) 21 or later.
  • Apache Maven 3.x or later.
  • Docker Desktop (or Docker Engine) - essential for running Elasticsearch.

Setup and Running the Application

Follow these steps to get the application up and running:

Start Elasticsearch (using Docker)

Navigate to the root directory of your project where your docker-compose.yml file is located (typically course-search/).

cd /path/to/your/project/course-search
docker-compose up -d

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages