Commit 1e2522c38b61d39095ae93c86f6b833ef88e3424
1 parent
b94bf86b
Exists in
master
Fixed fractional search timeout
Showing
1 changed file
with
1 additions
and
2 deletions
Show diff stats
lib/searchkick/query.rb
@@ -509,8 +509,7 @@ module Searchkick | @@ -509,8 +509,7 @@ module Searchkick | ||
509 | if Searchkick.search_timeout.is_a?(Integer) | 509 | if Searchkick.search_timeout.is_a?(Integer) |
510 | "#{Searchkick.search_timeout + 1}s" | 510 | "#{Searchkick.search_timeout + 1}s" |
511 | else | 511 | else |
512 | - # ensure at least 1 ms | ||
513 | - "#{(Searchkick.search_timeout * 1000).ceil}ms" | 512 | + "#{((Searchkick.search_timeout + 1) * 1000).round}ms" |
514 | end | 513 | end |
515 | 514 | ||
516 | # An empty array will cause only the _id and _type for each hit to be returned | 515 | # An empty array will cause only the _id and _type for each hit to be returned |