Commit 7f0f1f23fe8caef0fb5615ecb7759588979363bf

Authored by Andrew Kane
1 parent cba646ff

Fixed too_long_frame_exception exception with scroll method - fixes #1468

Showing 2 changed files with 5 additions and 6 deletions   Show diff stats
CHANGELOG.md
  1 +## 4.4.4 (unreleased)
  2 +
  3 +- Fixed `too_long_frame_exception` exception with `scroll` method
  4 +
1 5 ## 4.4.3 (2020-02-25)
2 6  
3 7 - Added support for Hunspell
... ...
lib/searchkick/results.rb
... ... @@ -188,14 +188,9 @@ module Searchkick
188 188  
189 189 records.clear_scroll
190 190 else
191   - params = {
192   - scroll: options[:scroll],
193   - scroll_id: scroll_id
194   - }
195   -
196 191 begin
197 192 # TODO Active Support notifications for this scroll call
198   - Searchkick::Results.new(@klass, Searchkick.client.scroll(params), @options)
  193 + Searchkick::Results.new(@klass, Searchkick.client.scroll(scroll: options[:scroll], body: {scroll_id: scroll_id}), @options)
199 194 rescue Elasticsearch::Transport::Transport::Errors::NotFound => e
200 195 if e.class.to_s =~ /NotFound/ && e.message =~ /search_context_missing_exception/i
201 196 raise Searchkick::Error, "Scroll id has expired"
... ...