Skip to content

Instantly share code, notes, and snippets.

@wilmoore
Last active December 24, 2024 00:15
Show Gist options
  • Select an option

  • Save wilmoore/7d1f58035e28fceb91048fdb8f26b700 to your computer and use it in GitHub Desktop.

Select an option

Save wilmoore/7d1f58035e28fceb91048fdb8f26b700 to your computer and use it in GitHub Desktop.
Business :: Ideas :: GistWiz :: Development :: Redis

Business :: Ideas :: GistWiz :: Development :: Redis

⪼ Made with 💜 by Polyglot.

related

Redis

Installing Redis Stack via Container (Docker)
❯ docker pull redis/redis-stack-server:latest
❯ docker stop redis-stack-server
❯ docker rm redis-stack-server
❯ docker run --name redis-stack-server -d -p 6379:6379 redis/redis-stack-server:latest
❯ docker ps
❯ docker logs --tail 1000 -f 3efc483cba08
Redis CLI
❯ docker exec -it redis-stack-server redis-cli
127.0.0.1:6379> FT.SEARCH {username} '(@description:USA Colorado*)' RETURN 2 gist_id description
127.0.0.1:6379> FT.SEARCH wilmoore '(@description:Travel Hot Springs Arizona)'
 1) (integer) 6
 2) "wilmoore:e07e173b7aaf6e209f67a62f5bbd1c63"
 3) 1) "gist_id"
    2) "e07e173b7aaf6e209f67a62f5bbd1c63"
    3) "description"
    4) "Travel :: Hot Springs :: USA :: Arizona"
 4) "wilmoore:e7693411ec7454c077c84ba6fd7b22be"
 5) 1) "gist_id"
    2) "e7693411ec7454c077c84ba6fd7b22be"
    3) "description"
    4) "Travel :: Hot Springs :: USA :: Arizona :: Research"
 6) "wilmoore:21a601d77978308a8616675544fea068"
 7) 1) "gist_id"
    2) "21a601d77978308a8616675544fea068"
    3) "description"
    4) "Travel :: Hot Springs :: USA :: Arizona :: Verde Hot Springs"
 8) "wilmoore:e9fc15e4f780e9086df3064fb4d5a141"
 9) 1) "gist_id"
    2) "e9fc15e4f780e9086df3064fb4d5a141"
    3) "description"
    4) "Travel :: Hot Springs :: USA :: Arizona :: Castle Hot Springs"
10) "wilmoore:a26187d905aa18d833bdeae7d58bc71b"
11) 1) "gist_id"
    2) "a26187d905aa18d833bdeae7d58bc71b"
    3) "description"
    4) "Travel :: Hot Springs :: USA :: Arizona :: Kachina Mineral Springs Spa"
12) "wilmoore:874f944a07962e7b8a26f7e2aef94acb"
13) 1) "gist_id"
    2) "874f944a07962e7b8a26f7e2aef94acb"
    3) "description"
    4) "Travel :: Hot Springs :: USA :: Arizona :: Eldorado Springs Pool & Resort"
127.0.0.1:6379>
Drop Index
127.0.0.1:6379> FT.DROPINDEX wilmoore DD
Create Index
127.0.0.1:6379> FT.CREATEINDEX wilmoore ...
List Indexes
127.0.0.1:6379> FT._LIST
Index
127.0.0.1:6379> HSET 
MULTI...EXEC
MULTI
HSET ...
EXEC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment