/jredisearch-spring-demo

A Spring Boot App showing how to implement faceted full-text search and autocomplete with RediSearch using JRediSearch

Primary LanguageJava

JRediSearch Spring Demo

A Spring Boot App showing how to implement faceted full-text search and autocomplete with RediSearch using the JRediSearch client library.

Prerequisites:

NOTE: If you're not on Mac or Windows, you may need to install Docker Compose as well.

Getting Started

Clone the Repository w/ Submodules

To install this example application, run the following commands:

git clone git@github.com:redis-developer/jredisearch-spring-demo.git --recurse-submodule

Import into your IDE

You can also import the code straight into your IDE:

Start the Docker Compose application:

cd jredisearch-spring-demo/docker
docker-compose up

Import the data into Redis using RIOT File

riot-file import-dump data/articles_authors.json

Launch the Application

./mvnw clean spring-boot:run

Usage

Full-text search over articles

On your browser, Postman or cURL try:

http://localhost:8080/api/articles/search/?q=chicken

Auto-complete search over author names

On your browser, Postman or cURL try:

http://localhost:8080/api/articles/authors/?q=ja

See Also

Quick Tutorial on Redis' Powerful Modules:

The following links on Redis and Java may also be helpful:

Help

Please post any questions and comments on the Redis Discord Server, and remember to visit our Redis Developer Page for awesome tutorials, project and tips. You can also email me bsb@redislabs.com.

License

MIT Licence

Credit

Created by Brian Sam-Bodden @ Redis Labs