2

Can I choose to ignore the tsENU.xml thesaurus file in a full-text query in SQL Server 2005?

IF @x = 0 THEN
    BEGIN
        SELECT FROM FREETEXTTABLE(use subtitutions and expansions in thesuarus)
    END
ELSE
    BEGIN
        SELECT FROM FREETEXTTABLE(just match based on the exact query terms, no thesuaurs)
    END
user5474
  • 21
  • 2

1 Answers1

0

Wrap the second query's search value(s) in quotes. Per the docs:

FREETEXTTABLE (table , { column_name | (column_list) | * } 
          , 'freetext_string' 
     [ ,LANGUAGE language_term ] 
     [ ,top_n_by_rank ] )

freetext_string is wordbroken, stemmed, and passed through the thesaurus. If freetext_string is enclosed in double quotation marks, a phrase match is instead performed; stemming and thesaurus are not performed.

ewbi
  • 1,823
  • 1
  • 12
  • 9