On Mon, Apr 16, 2007 at 04:53:31PM +0200, Chengcai He wrote: > Ruby Bharathrentals wrote: > > Hi I am trying to use ferret; the regular search works; but when I use > > the find_storage_by_contents to highlight the results, I am getting the > > above error. Please help > > thanks > [..] > > index = self.ferret_index # Get the index that acts_as_ferret created > for us > --------------------------------------------------------- > this line of code get some error! undefined method `ferret_index'!!! > Need help!!!
With the introduction of the DRb server things have become a bit more complicated here. You can access the ferret index instance when running locally (no DRb) with Model.aaf_index.ferret_index, however this is not intended to work with a remote ferret server. The good news is that aaf has it's own highlight method that you can call on every record that has been returned as a search result from aaf: highlight_strings = record.highlight(query, options...) Please see the api docs for a list of options. 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

