简体   繁体   中英

SQL Server — How to Implement Similar Content

I have a fulltext index on the title of my articles. When someone views an article i use the title as a search string to search the full text index. I can found that the longer the title gets the less results a get and most of the time I don't get any results even though there are releated content in the database. I have tried putting an index on the description as well but that didn't work either.

The longer the title gets, the fewer results you get. This gives a hint that you may be searching the index with either an expression or an implied AND, ie that you are instructing SQL to find all articles that have all of the words from the referenced doc title.

Maybe by using an "OR" type construct, you'd find more hits for the suggestion, but I'm a bit suspicious that the relevance of many such hits may be, less than good...

In the absence of any additional data (other than the full text index), it may be tough to provide a good suggestion feature, but some relatively inexpensive tricks (most of them based on the statistical distribution of various characteristics of the data, in particular within a given article) could help you induce the necessary support data to improve precision with the suggestion feature.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM