On 15/06/2007, at 9.35, Jens Kraemer wrote: > 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 > > > --
I know that this may be a bit off but the feature I'm looking for is to be able to determine how often lets say a name occurs in the complete index of an object. By default we sort results chronologically - this due to the context of the project. Thanks - i'll look into the above. mattias _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

