Class: Solr::Request::Commit4

Inherits:
Update
  • Object
show all
Defined in:
lib/fluent/plugin/out_solr.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Commit4

Returns a new instance of Commit4.



74
75
76
77
# File 'lib/fluent/plugin/out_solr.rb', line 74

def initialize(options={})
  @wait_searcher = options[:wait_searcher] || true
  @soft_commit = options[:soft_commit] || false
end

Instance Method Details

#to_sObject



80
81
82
83
84
85
86
# File 'lib/fluent/plugin/out_solr.rb', line 80

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