500 Error when searching Code across all groups

Summary

Browsing this URI causes a 500 error https://gitlab.com/search?utf8=%E2%9C%93&snippets=&scope=blobs&search=UserRebase

Steps to reproduce

  1. Visit https://gitlab.com/search
  2. Enter 'UserRebase'
  3. Hit Search
  4. In Group dropdown, enter gitlab.org and select it (search will automatically kick off)
  5. Select the Code tab
  6. Now change the Group downdown to Any

Relevant logs and/or screenshots

The 500 is recorded in Sentry https://sentry.gitlab.net/gitlab/gitlabcom/issues/820023/?query=is:unresolved

NoMethodError: undefined method `without_count' for []:Kaminari::PaginatableArray
Did you mean?  without
  from gitlab/search_results.rb:43:in `objects'
  from search_service.rb:52:in `search_objects'
  from search_controller.rb:27:in `show'
Edited Jun 25, 2019 by Luke Duncalfe
Assignee Loading
Time tracking Loading