lib/redi_search_rails.rb
# delete a string from a suggestion index.
#
# @param attribute [String]
# @param value [String] - string to delete
# @return [Integer] - 1 if found, 0 if not
delete a string from a suggestion index.
delete a string from a suggestion index .
def ft_sugdel (record:, attribute:)
      key = "#{@model}:#{attribute}"
      string = record.send(attribute)
      REDI_SEARCH.call('FT.SUGDEL', key, string)
    rescue Exception => e
      Rails.logger.error e if defined? Rails
      return e.message
    end
def ft_sugdel ( record : , attribute : ) key = "#{@model}:#{attribute}" string = record . send ( attribute ) REDI_SEARCH . call ( 'FT.SUGDEL' , key , string ) rescue Exception => e Rails . logger . error e if defined? Rails return e . message end
delete a string from a suggestion index.
delete a string from a suggestion index .
1 if found, 0 if not
1 if found 0 if not
Integer
record
<not_specific>
attribute
<not_specific>
<not_specific>
None
value
<not_specific>
string to delete
string to delete