ging / social_stream

A framework for building distributed social network websites
http://social-stream.dit.upm.es/
MIT License
1.13k stars 307 forks source link

ThinkingSphinx returning only 20 results #450

Closed ebarra closed 11 years ago

ebarra commented 11 years ago

base/lib/social_stream/search.rb line 48: ThinkingSphinx.search *args_for_search(query, subject, options)

That returns only 20 results as it does not have in the options the :per_page param. And then Kaminari paginates it (in the search_controller.rb) with 16 items per page so returning 2 pages, the first one with 16 and the second one with 4.

First approach would be to ask for more results (for example 200) and paginate them with Kaminari. But better solution would be to use ThinkingSphinx pagination instead of Kaminari's one.