On Mon, Oct 02, 2006 at 08:47:04PM +0200, Charlie Hubbard wrote:
> Jens Kraemer wrote:
[..]
> > you'll only need multi_search if you have several indexes (that is,
> > several Model classes where you called acts_as_ferret).
> > In your case, if you choose the second way, just index your meta data
> > together with the content, aaf will by default search in all fields.
> 
> So bottom line is create a Page object for each page of the article and 
> put that stuff in the DB, and use the acts_as_ferret options to find it. 
> Use the multi-search across the two models.

right. to further simplify things, you could index the article's meta
data with each page, via an indexed method you mention in your field
list. that method should retrieve the meta data from the parent article
object and get this indexed together with each page. 

this might actually be faster than using multi_search (unless your
article meta data is really large so that the overhead of indexing it
with each page weighs in). In addition it would save you from having
to handle different kinds of objects (Articles and Pages) in your result
set.

cheers,
Jens

-- 
webit! Gesellschaft für neue Medien mbH          www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer       [EMAIL PROTECTED]
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to