Class: AzureSearch::IndexDeleteOperation

Inherits:
IndexBatchOperation show all
Defined in:
lib/azure_search/index_batch_operation.rb

Overview

Represents a document deletion request.

Since:

  • 0.1.0

Instance Method Summary collapse

Methods inherited from IndexBatchOperation

delete, upload

Constructor Details

#initialize(key_name, key_value) ⇒ IndexDeleteOperation

Returns a new instance of IndexDeleteOperation.

Since:

  • 0.1.0



43
44
45
46
# File 'lib/azure_search/index_batch_operation.rb', line 43

def initialize(key_name, key_value)
  @key_name = key_name
  @key_value = key_value
end

Instance Method Details

#to_hashHash

Returns the delete operation as a Hash.

Returns:

  • (Hash)

    The delete operation.

Since:

  • 0.1.0



51
52
53
54
55
56
# File 'lib/azure_search/index_batch_operation.rb', line 51

def to_hash
  {
    @key_name => @key_value,
    "@search_action" => "delete"
  }
end