I recently decided to port my indexing engine from sphinx to solr. Having used kaminari with thinking_sphinx I decided to try making use of generic pagination in sunspot https://github.com/sunspot/sunspot/pull/64 / https://github.com/sunspot/sunspot/pull/67, in order to use avoid moving to will_paginate.
My search is handled as follows:
@search = Address.search do
fulltext params[:search]
with(:updated_at).greater_than(1.week.ago)
order_by :updated_at, :desc
paginate :page => params[:page], :per_page => 7
end
My view is unchanged from what I had when I was using thinking_sphinx:
<%= render :partial => 'address' %>
<%= paginate @addresses %>
My problem is that after the change I continually get the following error when trying to perform a search:
undefined method `current_page' for []:Array
I am using the latest version of sunspot, which to my knowledge should enable me to use kaminari:
Using sunspot (1.3.0.rc3) from git://github.com/sunspot/sunspot.git (at master)
Using sunspot_rails (1.3.0.rc3) from git://github.com/sunspot/sunspot.git (at master)
This worked perfectly with my old thinking_sphinx setup, so what am I doing wrong?