Hello,
I am working with Ferret and acts_as_ferret.
I have 9 different models that I am using for my search capability.
acts_as_ferret is working beautifully when I do searches on a specific
model.
The problems come when I try to do a search all
function.
===================
I can easily get a proper collection using the following method:
def search_all
@results = []
[Announcement, Event, Group, Job, Need, Offering, Organization,
Pedia, User].each do |model|
finds = model.find_by_contents(@query)
finds.each {|find| @results << find } unless finds.blank?
end
@results = @results.sort_by { |result| result.ferret_rank }
@results.reverse!
@total = @results.length
end
===================
The problems come in that I have no way to implement pagination, or
specify any further details.
I have been reading about Ferret::Index::MultiIndex does anyone know
how to use it? It would be of great help as it does what I wish.
–OR–
Does anyone have any suggestions for a better way to implement an
effective search across many different indexes?
Thanks!!