Skip to content

Instantly share code, notes, and snippets.

@itamarhaber
Created May 23, 2014 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itamarhaber/365c8c61fc9bfb3f6824 to your computer and use it in GitHub Desktop.
Save itamarhaber/365c8c61fc9bfb3f6824 to your computer and use it in GitHub Desktop.
Redis suffix index function in Lua. Call with key name of the search terms set and argument to index
redis.call("zadd", KEYS[1], 1, ARGV[1]:reverse())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment