I'm not sure I follow that completely, but I think what you're saying is that you want to find articles with the most tags in common. You say you only want articles that were written before the current one, but why not show articles written after as well? But maybe you have a reason for that.
Anyway, the way "similar threads" works is that it finds the similar threads then stores a field in the thread table that is a comma separated list of threadids, so that it doesn't do the work of locating the similar threads every time it needs to display them.
|