Skip to content

Commit 2856fa3

Browse files
dtyoungDan Youngshortcuts
authored
fix(ruby): Set default hits_per_page for SearchClient#browse_objects using accessor (#4253)
Co-authored-by: Dan Young <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 0a90531 commit 2856fa3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/ruby/search_helpers.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ end
9595
# @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `browse` method.
9696
# @param block [Proc] the block to execute on each object of the index.
9797
def browse_objects(index_name, browse_params = Search::BrowseParamsObject.new, request_options = {}, &block)
98-
browse_params[:hits_per_page] = browse_params[:hits_per_page] || 1000
98+
browse_params.hits_per_page ||= 1000
9999

100100
hits = []
101101
loop do

0 commit comments

Comments
 (0)