Module: Fuzzzy::Indexer

Included in:
Ngram::Indexer, Soundex::Indexer
Defined in:
lib/fuzzzy/methods/indexer.rb

Instance Method Summary collapse

Instance Method Details

#delete_dictionary(id) ⇒ Object



3
4
5
6
# File 'lib/fuzzzy/methods/indexer.rb', line 3

def delete_dictionary id
  redis.del(dictionary_key(id))
  redis.hincrby(counter_key, index_name, -1)
end

#save_dictionary(id, string) ⇒ Object



8
9
10
11
# File 'lib/fuzzzy/methods/indexer.rb', line 8

def save_dictionary id, string
  redis.set(dictionary_key(id), query_index_string)
  redis.hincrby(counter_key, index_name, 1)
end