Removies
Removies is an api that lets you search movies and tv shows information from a database of movies from several streaming services.
How it works
How the data is stored:
The data is stored as JSON documents using RedisJSON
public void insert(String key, MediaDTO mediaDTO) {
jedisPooled.jsonSet(key, gson.toJson(mediaDTO))
}
MediaDTO
is the object to be inserted but first it needs to be represented as JSON so we use gson
for that.
How the data is accessed:
To access data several indexes need to be created Then RediSearch is used to make queries.
jedisPooled.ftSearch(
"titleIdx", new Query("@title:(" + cleanTitle + ")").returnFields("title"));
}
How to run it locally?
Prerequisites
- Have an instance of redis-stack running.
- Apache Maven 3.8.6
- Java 17
Local installation
- Download the following…