How to Transform a user's search string into a MS SQL Full-Text Search Phrase
Posted
by Atomiton
on Stack Overflow
See other posts from Stack Overflow
or by Atomiton
Published on 2010-04-06T00:08:06Z
Indexed on
2010/04/06
0:13 UTC
Read the original article
Hit count: 678
I've search for answers for this and I can't seem to find an answer to what should be somewhat simple.
This is related to another question I asked, but it's different. What's the best way to take a user's search phrase and throw it into a CONTAINSTABLE(table, column, @phrase, topN )
phrase?
Say, for example the user inputs: Books by "Dr. Seuss"
What's the best way to turn that into something that will return results in my ContainsTAble()
phrase?
I was previously parsing the search phrase and writing something like ISABOUT("Books" WEIGHT(1.0), "by" WEIGHT(0.9), "Dr. Seuss" WEIGHT(0.8))
as my @phrase but ISABOUT seems to be returning odd results... especially when one word searches are entered.
Any Ideas?
© Stack Overflow or respective owner