Commit 316b9ad0450c088ff532ebec5422225397138504
1 parent
aa85a741
Exists in
master
and in
21 other branches
Fixed update error
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/searchkick.rb
... | ... | @@ -124,7 +124,7 @@ module Searchkick |
124 | 124 | response = client.bulk(body: items) |
125 | 125 | if response["errors"] |
126 | 126 | first_with_error = response["items"].map do |item| |
127 | - (item["index"] || item["delete"] || items['update']) | |
127 | + (item["index"] || item["delete"] || item["update"]) | |
128 | 128 | end.find { |item| item["error"] } |
129 | 129 | raise Searchkick::ImportError, "#{first_with_error["error"]} on item with id '#{first_with_error["_id"]}'" |
130 | 130 | end | ... | ... |