Example of how to use Elasticsearch and with Spring framework and Kotlin to add, search and suggest items.
The app uses UI to visualize elasticsearch functionality like suggesting product names based on user input
- Kotlin
- Spring 3.2.5
- Elasticsearch
- elasticsearch-rest-high-level-client 7.17
- Kibana
- Docker
- Kotest
You will need docker installed to run elasticsearch.
- Run
docker-compose up -d
command - Run the spring app. You can use your IDE
- Feed app with some test data. More about it in this document
- Open
http://localhost:8080/ui/index.html
UI is made with JS, CSS and HTML. It has a simple search bar, product list and suggestions
ui-preview.webm
The app provides several endpoints to add, search, filter and suggest products based on given fraze. You can find details in API file.