Module: Solr::Commands

Included in:
Solr
Defined in:
lib/solr/commands.rb

Instance Method Summary collapse

Instance Method Details

#commit(open_searcher: true, optimize: false, runner_options: nil) ⇒ Object



8
9
10
11
12
# File 'lib/solr/commands.rb', line 8

def commit(open_searcher: true, optimize: false, runner_options: nil)
  Solr::Commit::Request.new.run(optimize: optimize,
                                open_searcher: open_searcher,
                                runner_options: runner_options)
end

#data_import(params, runner_options: nil) ⇒ Object



24
25
26
27
# File 'lib/solr/commands.rb', line 24

def data_import(params, runner_options: nil)
  request = Solr::DataImport::Request.new(params)
  request.run(runner_options: runner_options)
end

#delete_by_id(id, commit: false, runner_options: nil) ⇒ Object



14
15
16
17
# File 'lib/solr/commands.rb', line 14

def delete_by_id(id, commit: false, runner_options: nil)
  request = Solr::Delete::Request.new(id: id)
  request.run(commit: commit, runner_options: runner_options)
end

#delete_by_query(query, commit: false, runner_options: nil) ⇒ Object



19
20
21
22
# File 'lib/solr/commands.rb', line 19

def delete_by_query(query, commit: false, runner_options: nil)
  request = Solr::Delete::Request.new(query: query)
  request.run(commit: commit, runner_options: runner_options)
end