From 7f0f1f23fe8caef0fb5615ecb7759588979363bf Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 10 Mar 2021 14:42:16 -0800 Subject: [PATCH] Fixed too_long_frame_exception exception with scroll method - fixes #1468 --- CHANGELOG.md | 4 ++++ lib/searchkick/results.rb | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 100ad39..465bb57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.4.4 (unreleased) + +- Fixed `too_long_frame_exception` exception with `scroll` method + ## 4.4.3 (2020-02-25) - Added support for Hunspell diff --git a/lib/searchkick/results.rb b/lib/searchkick/results.rb index 2187047..a1bf847 100644 --- a/lib/searchkick/results.rb +++ b/lib/searchkick/results.rb @@ -188,14 +188,9 @@ module Searchkick records.clear_scroll else - params = { - scroll: options[:scroll], - scroll_id: scroll_id - } - begin # TODO Active Support notifications for this scroll call - Searchkick::Results.new(@klass, Searchkick.client.scroll(params), @options) + Searchkick::Results.new(@klass, Searchkick.client.scroll(scroll: options[:scroll], body: {scroll_id: scroll_id}), @options) rescue Elasticsearch::Transport::Transport::Errors::NotFound => e if e.class.to_s =~ /NotFound/ && e.message =~ /search_context_missing_exception/i raise Searchkick::Error, "Scroll id has expired" -- libgit2 0.21.0