Hi, Who uses acts_as_searchable? How do you deal with pagination? Can it "plug in" to the paginate function in Rails? Petr -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Petr wrote:> Hi, > Who uses acts_as_searchable? How do you deal with pagination? Can it > "plug in" to the paginate function in Rails? > > PetrHi Petr, If you''re using the solr part of the acts_as_searchable plugin I suggest you switching over to this new acts_as_solr plugin. That''s what I did about 2 days ago and I''m much happier with the features provided by it. In your case if you need to do the pagination, simply do YourModel.find_by_solr("query", :start => 0, :rows => 10) or if you want the result to return only the ids, then do YourModel.find_id_by_solr("query", :start => 0, :rows => 10) If it interests you: http://acts-as-solr.rubyforge.org/ Thanks, Jimmy -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Does this use Hyperestraier too? I guess Id have to write my Next/Previous page function myself (easy), i was just wondering if theres a way to integrate it into the paginate rails object (Paginate.new). Cheers Petr Jimmy wrote:> Petr wrote: >> Hi, >> Who uses acts_as_searchable? How do you deal with pagination? Can it >> "plug in" to the paginate function in Rails? >> >> Petr > > Hi Petr, > > If you''re using the solr part of the acts_as_searchable plugin I suggest > you switching over to this new acts_as_solr plugin. That''s what I did > about 2 days ago and I''m much happier with the features provided by it. > > In your case if you need to do the pagination, simply do > YourModel.find_by_solr("query", :start => 0, :rows => 10) or if you want > the result to return only the ids, then do > YourModel.find_id_by_solr("query", :start => 0, :rows => 10) > > If it interests you: http://acts-as-solr.rubyforge.org/ > > Thanks, > > Jimmy-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---