pat / thinking-sphinx

Sphinx/Manticore plugin for ActiveRecord/Rails
http://freelancing-gods.com/thinking-sphinx
MIT License
1.63k stars 469 forks source link

Will_paginate does not show pages #1235

Closed msg7086 closed 1 year ago

msg7086 commented 1 year ago

Was following docs and wrote this code:

@posts = Post.search @term, with: conditions, order: 'created_at DESC', page: params[:page], sql: {include: [:statistic, :user, :category, :team]}

And in view

will_paginate @posts, :class => 'pull-right', :inner_window => 2, :renderer => BootstrapPagination::Rails

I always only get 1 page. If I manually pass page=2 I get 2 pages. What did I miss here?

Thanks.

msg7086 commented 1 year ago
irb(main):029:0> p.current_page
=> 1
irb(main):030:0> p.total_pages
=> 1
irb(main):031:0> p.total_entries
=> 286

Somehow total_pages is always 1?

msg7086 commented 1 year ago

Seems like it's related to manticore.

msg7086 commented 1 year ago

Duplicate of #1213 #1230.