Class: Solr::Request::Commit
- Defined in:
- lib/solr/request/commit.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Commit
constructor
A new instance of Commit.
- #to_s ⇒ Object
Methods inherited from Update
Methods inherited from Base
#content_type, #handler, #response_format
Constructor Details
#initialize(options = {}) ⇒ Commit
Returns a new instance of Commit.
17 18 19 20 |
# File 'lib/solr/request/commit.rb', line 17 def initialize(={}) @wait_searcher = [:wait_searcher] || true @wait_flush = [:wait_flush] || true end |
Instance Method Details
#to_s ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/solr/request/commit.rb', line 23 def to_s e = Solr::XML::Element.new('commit') e.attributes['waitSearcher'] = @wait_searcher ? 'true' : 'false' e.attributes['waitFlush'] = @wait_flush ? 'true' : 'false' e.to_s end |