Method: Elasticated::BulkRequest::Response.parse
- Defined in:
- lib/elasticated/bulk_request/response.rb
.parse(elasticsearch_response) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/elasticated/bulk_request/response.rb', line 7 def self.parse(elasticsearch_response) response = new response.took = elasticsearch_response['took'] response.errors = elasticsearch_response['errors'] response.items = elasticsearch_response['items'].map do |elasticsearch_item| ResponseItem.parse elasticsearch_item end response end |