Class: AzureSearch::IndexUploadOperation
- Inherits:
-
IndexBatchOperation
- Object
- IndexBatchOperation
- AzureSearch::IndexUploadOperation
- Defined in:
- lib/azure_search/index_batch_operation.rb
Overview
Represents an upload operation of a document.
Instance Method Summary collapse
-
#initialize(document) ⇒ IndexUploadOperation
constructor
A new instance of IndexUploadOperation.
-
#to_hash ⇒ Hash
Returns the upload operation as a Hash.
Methods inherited from IndexBatchOperation
Constructor Details
#initialize(document) ⇒ IndexUploadOperation
Returns a new instance of IndexUploadOperation.
28 29 30 |
# File 'lib/azure_search/index_batch_operation.rb', line 28 def initialize(document) @document = document end |
Instance Method Details
#to_hash ⇒ Hash
Returns the upload operation as a Hash.
35 36 37 38 |
# File 'lib/azure_search/index_batch_operation.rb', line 35 def to_hash @document["@search.action"] = "upload" @document end |