I have posts, and those posts have tags. Now what i would like to do is find, for a given post, the most similar posts based on the tags they have. I''d like to retrieve a list with all the posts from all the tags that the given post has, ordered by the number of how many similar tags they (the post and the retrieved posts) have. Can anybody give a hint for doing something like this? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve no idea, how you could directly query your tags and get those results. I think even to make areasonable decision on how "similar" two give words may be. If you want only the number of equal words, you could count them. But I would strongly recommend using a good indexing & search engine to do this. I''ve just moved a project with acts_as_taggable from ferret to sphinx and found sphinx a wonderful tool for such things. Ordering results by relevance & weighting fields works out of the box. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---