“Similar Posts” like functionality using MS SQL Server?

前端 未结 3 1512
长情又很酷
长情又很酷 2020-12-16 08:25

I have lots of article store in MS SQL server 2005 database in a table called Articles-

\"Articles (ArticleID, ArticleTitle, ArticleContent)\"
3条回答
  •  天命终不由人
    2020-12-16 08:49

    First of all you need to define what article similarity means.
    For example you can associate some meta information with articles, like tags.
    To be able to find similar articles you need to extract some features from them, for example you can build full text index.

    You can take advantage of full text search capability of MSSQL 2005

    -- Assuming @Title contains title of current articles you can find related articles runnig this query  
    SELECT * FROM Acticles WHERE CONTAINS(ArticleTitle, @Title)
    

提交回复
热议问题