Hi!

On Thu, Feb 22, 2007 at 10:38:59AM -0800, Ryan King wrote:
> On 2/22/07, Henrik Zagerholm <[EMAIL PROTECTED]> wrote:
> >
> >Hello list,
> >
> >I wonder if someone has some tips on joining a ferret search with a
> >database.
[..]
> 
> 
> Use acts_as_ferret [1], then either put the access rights stuff in the
> index, or post process the results from AAF.
> 
> -ryan
> 1. http://projects.jkraemer.net/acts_as_ferret/wiki

to expand this a bit, with aaf you can combine a ferret query with
the usual active record conditions, joins and includes like that:

Model.find_by_contents(query, {}, { :conditions => ["... ], :include =>... })

or just use find_id_by_contents to only retrieve id, model class and
score for each hit, and build your own AR query from that.

cheers,
Jens


-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to