Module: SimpleSolrClient::Core::Index
- Included in:
- SimpleSolrClient::Core
- Defined in:
- lib/simple_solr_client/core/index.rb
Instance Method Summary collapse
-
#add_docs(*hash_or_hashes) ⇒ Object
Add the given hash or array of hashes.
-
#clear ⇒ Object
Delete all document in the index and immdiately commit.
-
#delete(q) ⇒ Object
A raw delete.
Instance Method Details
#add_docs(*hash_or_hashes) ⇒ Object
Add the given hash or array of hashes
4 5 6 7 |
# File 'lib/simple_solr_client/core/index.rb', line 4 def add_docs(*hash_or_hashes) update(hash_or_hashes.flatten) self end |
#clear ⇒ Object
Delete all document in the index and immdiately commit
19 20 21 22 |
# File 'lib/simple_solr_client/core/index.rb', line 19 def clear delete('*:*').commit self end |
#delete(q) ⇒ Object
A raw delete. Your query needs to be legal (e.g., escaped) already
12 13 14 15 |
# File 'lib/simple_solr_client/core/index.rb', line 12 def delete(q) update({:delete => {:query => q}}) self end |