Does kaminari support pagination of a solr response ? If yes, how to convert the response to a kaminari-compatible format ?
Asked
Active
Viewed 638 times
1 Answers
2
Set up Kaminari for your project as described here - http://railscasts.com/episodes/254-pagination-with-kaminari
In your controller, if you have the following to perform the Solr search -
@vehicles = Vehicles.search do
with (:year => 2012)
paginate :page => params[:page], :per_page => 20
end
You need to add the following in your view to get the pagination links -
<%= paginate @vehicles.hits %>
Hope that helps!

Anand
- 21
- 4