It sounds like you're paginating with pages of 10,000 records... so, 
max_matches will need to be as high as the maximum amount of pages you want to 
allow. Let's presume it's three for this example... so, in your sphinx.yml, 
you'll need to set it to 30,000 for all environments:

  development:
    max_matches: 30000

And then in searching, you'll also need to specify it, plus the number of 
records per page:

  Model.search('foo', :max_matches => 30_000).per(10_000).page(params[:page])

(For those not familiar with Kaminari, that's where the #per and #page methods 
are from - works just like :per_page and :page options).

Cheers

-- 
Pat

On 12/07/2011, at 11:24 PM, pix_plm wrote:

> Hi,
> we are using thinking sphinx 2.0.1 with rails 3.1 and Kaminari.
> We have about 8.000.000 records in our database, we set up max_matches
> to 10.000.
> it is very common to have a search result bigger than 10.000, so we
> show the pagination of the first 10.000 records but I'd liked to show
> the next 10.000 records, (by adding a button in the view to launch a
> new request starting at the 10.001 record), I can't make that works ?
> I saw a setLimits in Sphinx but nothing like that in thinking sphinx,
> is anybody know how to do that ?
> thank you
> regards
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/thinking-sphinx?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to