Module: SimpleSolr::Update::InstanceMethods

Defined in:
lib/simple_solr/update.rb

Instance Method Summary collapse

Instance Method Details

#add_to_solrObject

callback which uses httparty to send a POST to solr.



38
39
40
41
42
# File 'lib/simple_solr/update.rb', line 38

def add_to_solr
  if SimpleSolr.configuration.present?
    self.class.post(SimpleSolr.configuration.master_uri + "/update?commit=true", :body => to_solr)
  end
end

#delete_from_solrObject



44
45
46
47
48
# File 'lib/simple_solr/update.rb', line 44

def delete_from_solr
  if SimpleSolr.configuration.present?
    self.class.post(SimpleSolr.configuration.master_uri + "/update?commit=true", :body => to_solr_delete)
  end
end