Friday, March 23, 2012

Front-end website search using Full-Text

I am building a front-end search on a website to serach through the
contents of a full-text enabled databsae. I have everything set-up and
working using FREETEXTTABLE.

Here is what I want to do. When a user types in a search phrase that
has a couple words in quotes, I want it to do an AND for those instead
of the normal OR that freetexttable seems to do. Is there something
built into SQL Server that can handle this or do I need to parse the
phrase myself and build up some sort of logical operation with the
words and a combination of AND's and OR's. Has anyone done this or
have freeware that handles it or any suggestions at all.

Thanks in advance for any help.FREETEXTTABLE doesn't match exact words, so if you need that
functionality you'll probably need to check out CONTAINSTABLE as well.
>From what little I know of fulltext searching, there seems to be very
limited support for variables and parameters, so you might find you
have to build up your queries yourself. Having said that, it would
probably be worth posting to microsoft.public.sqlserver.fulltext to see
if people there have more specific advice.

Simon

No comments:

Post a Comment