Thanks Pat for your answer but it's not what I meant.
I paginate my 10.000 results ok.
my problem is : I have 8 millions photos in my database, search
results usually exeeds max_matcheds (10 000), if I set up max_matches
to 30 000 or more then it is very slow to show results,
right now, the first 10000 results appear ok with pagination but what
I liked to do is to let the user sees the next 10000 results, so for
exemple adding a button which will make a new request to TS for
getting the next 10 000 photos of the result, something like :
Model.search('foo', max_matches => 10000).per(40).page(params[:page])
with a start limit or offset to 10001 and so on with the possibility
to show last photoThanks On 14 juil, 10:45, Pat Allan <[email protected]> wrote: > 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 > > athttp://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.
