Hi,
Who uses acts_as_searchable? How do you deal with pagination? Can it
“plug in” to the paginate function in Rails?
Petr
Hi,
Who uses acts_as_searchable? How do you deal with pagination? Can it
“plug in” to the paginate function in Rails?
Petr
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
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs