Tag Similarity using Fulltext Indexing

In my previous post i discussed how to implement cosine theorem to tags. Again using my previous post database design

I created a fulltext catalog named VideoCatalog and put fulltext index on Video table's Tag attribute(Column).

By this way i can search tables by rank using containstable function

This query returns Videos which have Tags contains "First Person Shooter" and "Strategy". The key point of the query is "First Person Shooter" is more important than "Strategy".

So in my business logic i have to write an querystringhelper to build a query. Fortunately i wrote an QueryBuilder for fulltext search operations. [To See].

For ranked query builder i used the same methods but i added a new function that is the picture below

For querying most related videos i wrote a stored procedure

After that by using the entity framework modeling feature of VS 2008 added these stored procedure and bind it with a function that returns video entity

and here is the result

Download Source Code

Hiç yorum yok: