On Thu, Jun 14, 2007 at 06:22:53PM +0200, Mattias Bud wrote: > Mattias Bud wrote: > > Is there any way you could get the number of occurrences of the search > > in one hit? > > > > In a result I get the ferret_rank and ferret_score but not how many hits > > the search generated in the current record. > > > > I would also like to be able to sort after this when I search.
Do you mean the number of times the query occurs in a hit? There's no such function, and for non-trivial queries consisting of more than one term - what number should it return? Here's an example how you can retrieve how often a term occurs in a specific field of a document: http://ferret.davebalmain.com/api/classes/Ferret/Index/TermVector.html hth, 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

