module SimpleSolrClient::Core::Index

Public Instance Methods

add_docs(*hash_or_hashes) click to toggle source

Add the given hash or array of hashes @return self

# File lib/simple_solr_client/core/index.rb, line 4
def add_docs(*hash_or_hashes)
  update(hash_or_hashes.flatten)
  self
end
clear() click to toggle source

Delete all document in the index and immdiately commit @return self

# File lib/simple_solr_client/core/index.rb, line 19
def clear
  delete('*:*').commit
  self
end
delete(q) click to toggle source

A raw delete. Your query needs to be legal (e.g., escaped) already @param [String] q The query to identify items to delete @return self

# File lib/simple_solr_client/core/index.rb, line 12
def delete(q)
  update({:delete => {:query => q}})
  self
end