5

I am running a small website wherein I would like to make a functionality like Related Links section.

For that I created fulltext catalog and index.

So far I tried many ways to create search query which behaves like google, but I would say i was not even 10% close to what google is doing. During my research what i found was only following query was pulling good records.

Select col1, col2
from MyTable
Where
FREETEXT(col1,  'User Passed Search Text')

Has anyone has good way to create a FullText Search Query which can help in getting better related records for given text?

Thanks

BenV
  • 11,731
  • 10
  • 62
  • 90
dotnetguts
  • 695
  • 3
  • 7
  • 8

3 Answers3

1

Seemsthe fulltext topic has been discussed quite a bit: Stackover Flow Pros and Cons of full text search types. I might suggest reading over that, as the query you're trying above doesn't even seem to be working that well.

Community
  • 1
  • 1
Petrogad
  • 4,386
  • 5
  • 33
  • 76
  • Hi Frederico, I didn't found any useful answer in that. In case you have created any query in past which was helpful in searching related records, could you please share with me. What i am looking for is a simple mechanism to find related records based on user entered search text. Thanks – dotnetguts Jul 09 '10 at 19:44
0

in where condition put * in place of col1 it will search in complete table and gives you result check the link http://sqlmag.com/sql-server/sample-full-text-search-engine

0

Take a look at this article, you might find it useful

Full Text Search on SQL Server Central

aledpardo
  • 735
  • 11
  • 19
  • 1
    It's not a good idea to post links without summarizing their contents. Websites go down all the time. – Chris Pfohl Nov 29 '12 at 12:42
  • 1
    that link is unviewable unless you register, so not worth mutch :( – MrKekson Jan 15 '15 at 12:16
  • You can see how to implement this here: http://stackoverflow.com/questions/506034/converting-user-entered-search-query-to-where-clause-for-use-in-sql-server-full/30409654#30409654 – franzo May 23 '15 at 06:34