Class: Solr::Request::Commit

Inherits:
Update show all
Defined in:
lib/solr/request/commit.rb

Instance Method Summary collapse

Methods inherited from Update

#handler, #response_format

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(options={})
  @wait_searcher = options[:wait_searcher] || true
  @wait_flush_option = options[:wait_flush_option] || false
end

Instance Method Details

#to_sObject



22
23
24
25
26
# File 'lib/solr/request/commit.rb', line 22

def to_s
  e = Solr::XML::Element.new('commit')
  e.attributes['waitSearcher'] = @wait_searcher ? 'true' : 'false'
  e.to_s
end