module Solr4R::Client::UpdateMixin
Public Instance Methods
add(doc, attributes = {}, params = {}, options = {}, &block)
click to toggle source
See Solr4R::Builder#add.
# File lib/solr4r/client/update_mixin.rb, line 47 def add(doc, attributes = {}, params = {}, options = {}, &block) update(builder.add(doc, attributes), params, options, &block) end
add_batch(docs, *args, &block)
click to toggle source
# File lib/solr4r/client/update_mixin.rb, line 53 def add_batch(docs, *args, &block) batch(*args, &block).batch(docs).flush end
batch(*args, &block)
click to toggle source
# File lib/solr4r/client/update_mixin.rb, line 57 def batch(*args, &block) Batch.new(self, *args, &block) end
commit(attributes = {}, params = {}, options = {}, &block)
click to toggle source
# File lib/solr4r/client/update_mixin.rb, line 62 def commit(attributes = {}, params = {}, options = {}, &block) update(builder.commit(attributes), params, options, &block) end
delete(hash, params = {}, options = {}, &block)
click to toggle source
# File lib/solr4r/client/update_mixin.rb, line 83 def delete(hash, params = {}, options = {}, &block) update(builder.delete(hash), params, options, &block) end
delete_all( params = {}, options = {}, &block)
click to toggle source
See delete_query.
# File lib/solr4r/client/update_mixin.rb, line 104 def delete_all( params = {}, options = {}, &block) delete_query(MATCH_ALL_QUERY, params, options, &block) end
Also aliased as: clear
delete_id(id, params = {}, options = {}, &block)
click to toggle source
See delete.
# File lib/solr4r/client/update_mixin.rb, line 90 def delete_id(id, params = {}, options = {}, &block) delete({ id: id }, params, options, &block) end
delete_query(query, params = {}, options = {}, &block)
click to toggle source
See delete.
# File lib/solr4r/client/update_mixin.rb, line 97 def delete_query(query, params = {}, options = {}, &block) delete({ query: query }, params, options, &block) end
optimize(attributes = {}, params = {}, options = {}, &block)
click to toggle source
# File lib/solr4r/client/update_mixin.rb, line 69 def optimize(attributes = {}, params = {}, options = {}, &block) update(builder.optimize(attributes), params, options, &block) end
rollback( params = {}, options = {}, &block)
click to toggle source
# File lib/solr4r/client/update_mixin.rb, line 76 def rollback( params = {}, options = {}, &block) update(builder.rollback, params, options, &block) end
update(data, params = {}, options = {}, path = DEFAULT_UPDATE_PATH, type = DEFAULT_UPDATE_TYPE, &block)
click to toggle source
# File lib/solr4r/client/update_mixin.rb, line 37 def update(data, params = {}, options = {}, path = DEFAULT_UPDATE_PATH, type = DEFAULT_UPDATE_TYPE, &block) post(path, data, params, amend_options_hash( options, :headers, 'Content-Type' => type), &block) end