Skip to content

djanowski/replete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Replete – Redis autocomplete in Ruby

All the credit goes to Salvatore: http://antirez.com/post/autocomplete-with-redis.html and http://gist.github.com/574044.

Usage

Basic setup:

require "replete"

Replete.key = Nest.new("replete", Redis.connect)

Load test data:

require "open-uri"

Replete.index(open("http://antirez.com/misc/female-names.txt").read.split)

Now search:

Replete.search("marcell")
# => ["marcella", "marcelle", "marcellina", "marcelline"]

Replete.search("marcell", 2)
# => ["marcella", "marcelle"]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages