[thelist] MS SQL Using 'FormsOf(INFLECTIONAL, ) in a full-text search

Chris Marsh thelist at cjmarsh.com
Tue Aug 15 17:58:16 CDT 2006


Casey

> >>Perhaps repeating the entire query may make a light bulb go on for
> someone...<<
>
> DECLARE @SearchWord nvarchar(4000)
> SET @SearchWord = 'tax'
> SELECT listing_id, RANK, name, address, city, zip, heading, 
> phone FROM listings a, FREETEXTTABLE(listings, *, 
> 'FormsOf(INFLECTIONAL, @SearchWord') WHERE [KEY] = 
> a.listing_id ORDER BY RANK DESC, name
> 
> This returns no results. It treats the paramater as a NULL 
> value.  But this...
> 
> 
> SELECT listing_id, RANK, name, address, city, zip, heading, 
> phone FROM listings a, FREETEXTTABLE(listings, *, 
> 'FormsOf(INFLECTIONAL, tax') WHERE [KEY] = a.listing_id ORDER 
> BY RANK DESC, name
> 
> returns over 500 results. 

Tae a look at the following documentation:

<http://msdn2.microsoft.com/en-us/library/ms177652.aspx>

<quote>

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

"freetext_string
[..]
"Use of WEIGHT, FORMSOF, wildcards, NEAR and other syntax is not allowed."

</quote>

Would one not take this to mean that the use of FORMSOF is not allowed as an
argument for FREETEXTTABLE? Perhaps the 500+ results from your query are not
based on the results of your FORMSOF query, but based on the string
"FormsOf(INFLECTIONAL, tax"? If it's not a typo in your email, it's strange
that your mismatched quotes and parentheses are not generating any errors.

HTH

-- 
Regards

Chris Marsh

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.10/419 - Release Date: 15/08/2006
 





More information about the thelist mailing list