lib/search_flip/bulk.rb in search_flip-3.9.0 vs lib/search_flip/bulk.rb in search_flip-4.0.0.beta
- old
+ new
@@ -141,15 +141,15 @@
.headers(accept: "application/json", content_type: "application/x-ndjson")
.put(url, body: @payload)
return if options[:raise] == false
- parsed_response = SearchFlip::JSON.parse(response.to_s)
+ parsed_response = response.parse
return unless parsed_response["errors"]
parsed_response["items"].each do |item|
- item.each_value do |element|
+ item.each do |_, element|
status = element["status"]
next if status.between?(200, 299)
next if ignore_errors.include?(status)