module EsClient::ActiveRecord::Glue

Public Instance Methods

as_indexed_json() click to toggle source
# File lib/es_client/active_record/glue.rb, line 36
def as_indexed_json
  as_json
end
es_client_callbacks_enabled?() click to toggle source
# File lib/es_client/active_record/glue.rb, line 32
def es_client_callbacks_enabled?
  EsClient.callbacks_enabled
end
es_client_destroy() click to toggle source
# File lib/es_client/active_record/glue.rb, line 22
def es_client_destroy
  return if new_record?
  es_client.destroy_document(id)
end
es_client_document(force=false) click to toggle source
# File lib/es_client/active_record/glue.rb, line 27
def es_client_document(force=false)
  return @es_client_document if !force && defined?(@es_client_document)
  @es_client_document = es_client.find(id)
end
es_client_save() click to toggle source
# File lib/es_client/active_record/glue.rb, line 13
def es_client_save
  es_client.save_document(self)
end
es_client_update(additional_doc=nil) click to toggle source
# File lib/es_client/active_record/glue.rb, line 17
def es_client_update(additional_doc=nil)
  return if new_record?
  es_client.update_document(self, additional_doc)
end