[thelist] Relevancy Algorithm ... Solved

Rob Smith rob.smith at THERMON.com
Wed Mar 5 17:14:01 CST 2003


You know, if all fails read the instructions:

...
<prefix_term>

Specifies a match of words or phrases beginning with the specified text.
Enclose a prefix term in double quotation marks ("") and add an asterisk (*)
before the ending quotation mark, so that all text starting with the simple
term specified before the asterisk is matched. The clause should be
specified this way: CONTAINS (column, '"text*"') The asterisk matches zero,
one, or more characters (of the root word or words in the word or phrase).
If the text and asterisk are not delimited by double quotation marks, as in
CONTAINS (column, 'text*'), full-text search considers the asterisk as a
character and will search for exact matches to text*.

When <prefix_term> is a phrase, each word contained in the phrase is
considered to be a separate prefix. Therefore, a query specifying a prefix
term of "local wine *" matches any rows with the text of "local winery",
"locally wined and dined", and so on.
...

So I try

SELECT     ProductAuto, ProductID, ProductDesc
FROM         dbo.Product FT_TBL
WHERE     CONTAINS(ProductID, '"*15140*"')

Bingo!

Thanks All (that was easy)



More information about the thelist mailing list