On 9/3/06, Jean-Christophe Michel <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to use highlight ferret method with trunk aaf and 0.10.1 > ferret. > In my search display I use: > > Myindexedclass.ferret_index.searcher.highlight(@query, result_line.id, > :content) > > * searcher is a protected method; how can I access to the searcher from > aaf ?
I've added a highlight method to Ferret::Index::Index so you'll be able to use it now. > * is the doc id in aaf the same as my model id ? No, but (I'm pretty sure) the model id is automatically stored in the :id field in each document. > * is the first param, query, the string query or the query object ? As with all Index methods, Index#highlight takes a string or a Query object. The Searcher#highlight method however only takes Query objects. Note also that you must specify the field to highlight when using Searcher#highlight however the default_field is used for Index#highlight unless specified otherwise. Cheers, Dave _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

