Commit 75fae6a52b8929271b6868d29e3c16284f0cd0e5
1 parent
49953882
Exists in
master
Fixed search timeout with elasticsearch 8+ and opensearch-ruby gems - #1593
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
CHANGELOG.md
lib/searchkick/middleware.rb
@@ -3,7 +3,7 @@ require "faraday" | @@ -3,7 +3,7 @@ require "faraday" | ||
3 | module Searchkick | 3 | module Searchkick |
4 | class Middleware < Faraday::Middleware | 4 | class Middleware < Faraday::Middleware |
5 | def call(env) | 5 | def call(env) |
6 | - if env[:method] == :get && env[:url].path.to_s.end_with?("/_search") | 6 | + if env[:url].path.to_s.end_with?("/_search") |
7 | env[:request][:timeout] = Searchkick.search_timeout | 7 | env[:request][:timeout] = Searchkick.search_timeout |
8 | end | 8 | end |
9 | @app.call(env) | 9 | @app.call(env) |