Skip to content

samthom/my-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

my-library

Simple project that uses redis plugins such as redisjson and redisearch to implement my library app

Storing data

To use insert json into Redis run npm run insert books.json.

Queries implemented

  1. Simple search on text attributes of idx:books index
FT.SEARCH idx:books Kaz
  1. Simple sorting using search
FT.SEARCH idx:books * SORTBY rating DESC RETURN 2 name rating 
  1. Aggregate query with multiple steps
FT.AGGREGATE idx:books * GROUPBY 1 @author REDUCE COUNT 0 AS no_of_books SORTBY 2 @no_of_books DESC LIMIT 0 5

Nodejs Project

Redis package Command to run rest API

npm run start

Endpoints

Query Endpoint
Search localhost:8000?search=Kaz
Sort localhost:8000/top
Aggregation localhost:8000/most-read

About

Simple project that uses redis plugins such as redisjson and redisearch to implement my library app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published