alexelisenko - 5:42 am on Aug 3, 2010 (gmt 0)
I am stumped as to how to build this query, or if its even possible.
I has three tables, info, tagmap, tags
Table 1: Info
0 | Example
1 | Example2
Table 2: Tagmap
0 | 0 | 1
1 | 0 | 2
3 | 1 | 3
4 | 1 | 4
Table 3: Tags
0 | Tagone
1 | Tagtwo
3 | Tagthree
4 | Tagfour
So as you can see I have a tagmap table that references an info item and a tagid, then a tag table that has the name of the tag
in the tagmap, there are 20-30 entries for each info item
I need to make a query that will look at all the tags that are associated with an item and return results for other items that have the most tags in common.
If anyone has any idea on how to do this please let me know.
I have tried comparing just 5 or so tags, on at a time but it does not return results that are relevant enough, so I think I need to compare all tags and return the items that has the most in common.