Class: Solr::Delete::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/solr/delete/request.rb

Constant Summary collapse

PATH =
'/update'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Request

Returns a new instance of Request.



10
11
12
13
# File 'lib/solr/delete/request.rb', line 10

def initialize(options = {})
  options = validate_delete_options!(options)
  @delete_command = { delete: options }
end

Instance Attribute Details

#delete_commandObject (readonly)

Returns the value of attribute delete_command.



8
9
10
# File 'lib/solr/delete/request.rb', line 8

def delete_command
  @delete_command
end

Instance Method Details

#run(commit: false, runner_options: nil) ⇒ Object



15
16
17
18
19
# File 'lib/solr/delete/request.rb', line 15

def run(commit: false, runner_options: nil)
  http_request = build_http_request(commit)
  options = default_runner_options.merge(runner_options || {})
  Solr::Request::Runner.call(request: http_request, **options)
end