Demoes using the https://openbeerdb.com/ dataset.
To run the demo:
$ git clone https://github.com/K-Jo/redis-day-banaglore-demoes.git
$ cd redis-day-banaglore-demoes
$ docker-compose up
If something went wrong, you might need to force docker-compose to rebuild the containers
$ docker-compose up --force-recreate --build
- Search for your favourite beer in the beer index
- Add an
alias
to the index and query the alias for your favourite beer
- Install python deps
pip install click redis
- Run fridge simulator script:
python3 ./fridgesimulator/fridge-sensors.py --port 6382
- In RedisInsight, go to the "redistimeseries" db and switch to RedisTimeSeries tool
- Run query:
TS.MRANGE - + FILTER __class__=fridge
- Set Y-axis min to
0
and max to40
- Toggle on auto-update (top-right side of query card)
- Switch to the fridge simulator terminal. Open a fridge, take some beers and then close it
- Create full-text index on brewery name:
CALL db.idx.fulltext.createNodeIndex('Brewery', 'name')
- Run
CALL db.idx.fulltext.queryNodes('Brewery', '%brew%') yield node MATCH (node)<-[:BREWED_BY]-(b)<-[:LIKES]-(:Person {pid:46}) WITH node, count(b) as count RETURN node.name, count ORDER BY count DESC limit 10