With Rails or does sphinx handle the calculations all together?
Anton Anykeyev wrote in post #968296:
> you can use any function in group_by clause, for example you can write
> something like
>
> your_record_collection.group_by{|zz|
> function_returning_found_times}.each do |count_of_times, sub_collection|
>
> next if count_of_times<SOME_VALUE #
> user_ids = sub_collection.collect(&:user_id).join(',')
> users_cnt = sub_collection.size
>
> ...etc
>
> end
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment