I am using solr via sunspot in my rails application where I need to return more than 30 records which is set by default. I can do it as told in
Sunspot solr but i don’t want pagination for the data. I want to display all the data in a single page irrespective of rows. Also providing a hard coded value is not a probable solution which I’m looking for.
I am using solr via sunspot in my rails application where I need to
Share
Solr always paginates, so it looks like there’s no way to disable pagination through Sunspot (https://groups.google.com/forum/#!topic/ruby-sunspot/kVKfsrDpokc). The only thing I can think to do is get the number of records for your model before the search, and then set the per_page variable to that number so you’re guaranteed to only return one page. Something like this: