class RediSearch::Hset

Attributes

document[R]
index[R]

Public Class Methods

new(index, document) click to toggle source
# File lib/redi_search/hset.rb, line 5
def initialize(index, document)
  @index = index
  @document = document
end

Public Instance Methods

call() click to toggle source
# File lib/redi_search/hset.rb, line 14
def call
  call!
rescue Redis::CommandError
  false
end
call!() click to toggle source
# File lib/redi_search/hset.rb, line 10
def call!
  RediSearch.client.call!(*command, skip_ft: true)
end

Private Instance Methods

command() click to toggle source
# File lib/redi_search/hset.rb, line 24
def command
  ["HSET", document.document_id, document.redis_attributes].compact
end