tags:

views:

45

answers:

2

Hi there. I work for a high traffic content website that offers news, photos & videos (amongst other things). One thing we struggle with is perfecting our "related items" module. If you are viewing a video, we show a list of 5 related videos. This applies to blog posts, articles, etc... Our team does a good job tagging the content w/ keywords as well as relating it to an appropriate category, and associating it with items of other content types, but whatever mechanism we try when displaying "related content" it's never close to 100% accurate.

Are there any tried and true ways to get fairly accurate results based on the tagged keyword, title, or category name? Our site is .net (c#) and uses SQL 2005. Let me know if you need me to elaborate.

Thanks!

+1  A: 

Hello RJ,

It's already great that you are using tags to categorize your items. This can be either very powerful or very weak depending on the tags you are using.

First of all: Make sure you are using meaningful tag names.

[ Bad ones: C#1, C#1.0, Ruby1, Ruby-1 and so on ]

[ Good ones: C#1, C#2, C#3, Ruby1, Ruby2 and so on ]

You can now build your GetRelatedItmesList method which of course is Generic and do checks in that.

For example something like this:

List<T> GetRelatedItemsList<T> (T item) where T : IOurMediaItem // I used an interface here because I like them :P - it can also be a class.
{
    if (item.TagCount == 1)
    {
        // Get related items with the same tag and based on some keywords in title
    }
    else
    {
        // First: Get all items with exactly the tags
        // Second Get all items with relating title and append it to the list
    }
}

Either way, you can also do a switch() on the item.TagCount property / method.

Shaharyar
Cool... I didn't know you could specify the type that a generic had to be. Of course, you could just use the interface instead of a generic, but I guess sometimes it's useful to be working with the actual derived type rather than a base type. Anyway, I'm glad I saw this. You learn something new every day, huh? =)
Benny Jobigan
A: 

Using tags is the easiest way I see to get these kind of functionality, for example, if you are showing the article or video that is having arts, fun tags, you can load top 3 videos of arts and fun under the related video section.

I use Tags because they are much more flexible, but use strict rules when Tags are saved.

I hope this make sense

lakhlaniprashant.blogspot.com
Right. Since certain tags we use are very general and high frequency, we've been pulling "recent" content off of the least frequent tags on a particular item. This works better than getting recent content off high frequency tags but it seems like in the end there's always a case where one works better than the other.
RJ