Skip to content

fix(ruby): Set default hits_per_page for SearchClient#browse_objects using accessor #4253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/ruby/search_helpers.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ end
# @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `browse` method.
# @param block [Proc] the block to execute on each object of the index.
def browse_objects(index_name, browse_params = Search::BrowseParamsObject.new, request_options = {}, &block)
browse_params[:hits_per_page] = browse_params[:hits_per_page] || 1000
browse_params.hits_per_page ||= 1000

hits = []
loop do
Expand Down
Loading