Go into the rails console:
# foreman-rake console
Then run the following:
Katello::Distribution.search{ filter :terms, :repoids => Katello::ContentView.find(5).repositories_to_publish.pluck(:pulp_id); size 100 }.as_json
replacing 5, with the content view ID, as found in the URL on the content views page:
http://abed.example.com/content_views/5/versions
within the foreman console:
User.current = User.first
Tire.index(Katello::Distribution.index).delete
Katello::Distribution.index_all