An open API service indexing awesome lists of open source software.

https://github.com/jorgermduarte/poc-java-opensearch


https://github.com/jorgermduarte/poc-java-opensearch

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

          

# OpenSearch Spring Boot Proof of Concept

[![OpenSearch Version](https://img.shields.io/badge/OpenSearch-2.14.0-blue)](https://opensearch.org/)
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.2.0-brightgreen)](https://spring.io/projects/spring-boot)

A Proof of Concept demonstrating OpenSearch integration with Spring Boot for product catalog management and search capabilities.

## Features

- 📦 Product indexing with OpenSearch
- 🔍 Full-text search across product names and descriptions
- ✅ CRUD operations for product management
- 🐳 Dockerized OpenSearch setup
- 🚀 REST API endpoints for easy integration

## Prerequisites

- Docker 20.10+
- Java 21+
- Maven 3.8+
- IDE (IntelliJ, VS Code, or Eclipse)

## Technologies

- **Spring Boot 3.2.0**
- **OpenSearch 2.14.0**
- OpenSearch Java Client
- Spring Web MVC

## API Documentation

### Endpoints

| Method | Endpoint | Description |
|--------|-------------------------|---------------------------|
| POST | /api/products | Create/Index a new product |
| GET | /api/products/{id} | Get product by ID |
| GET | /api/products/search | Search products by query |

### Testing
I've added a requests.http where you can set the dev environment to test the POC with the following use cases:

1. [Index a Product](#1-index-a-product-post)
2. [Get Product by ID](#2-get-product-by-id-get)
3. [Search Products](#3-search-products-get)
4. [Edge Case Examples](#4-edge-case-examples)

IntelliJ HTTP Request Client requests demonstration:

![alt text](resources/image.png)