A Spring-Boot webapp with RESTful endpoints to demonstrate Redis Search with Java and Jedis
- Java 21 though may work with earlier versions
- Redis
./gradlew bootRun
./gradlew build
java -jar build/libs/search-0.0.1-SNAPSHOT.jar
A Tomcat web server is running at http://localhost:8080
There are two search use cases demonstrated here. The sample data files are in the resources folder.
-
See SearchController.java for the code to load and index data, and to execute search queries for a banking transaction use case It generates fake data except for the description which is pulled from a file To load data use this endpoint: http://localhost:8080/load To search data use this endpoint: http://localhost:8080/search?amount=n&term=t
-
See SecurityController.java for the code for a securities search use case. This provides two RESTful services: one to load and index data, and the other to search data. To load data use this endpoint: http://localhost:8080/loadsec To search data use this endpoint: http://localhost:8080/searchsec?term=t where t is a search term.