For better compatibility with the code using your search model use aaf's
SearchResults class:

   def do_search
     title_results = Term.multi_search( "title:(#{query})", 
                                        [Article, Term] )
     body_results  = Term.multi_search( "#{query} -title:(#{query})",
                                        [Article, Term] )
     new ActsAsFerret::SearchResults( title_results + body_results,
                                      title_results.total_hits + 
body_results.total_hits )
   end

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