Hello, I need to be able to count the occurences of certain terms in the reults. Currently my setup is Ferret 0.10.1 aaf bleeding edge.
results = VoObject.find_by_contents(query,:offset=>page, :limit=> 20,:sort => sort_fields) I use results.total_hits for pagination. This all works really nicely. However i need to be able to know how many occurences of certain predefined terms occur in each result set. So in the animals fields there can be "mouse", "cat", "fish". A perfect sollution would be to have the results set has some extra attributes like results.cat_hits (that would be amazing) In reality there needs to be counts for 5 different fields. So is this something that ferret can do easily? How do i get ferret and aaf to produce this data for each search result? What should i go and investigate? Best reagards caspar -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

