Web Design Glasgow

Web Strategy Blog

For the life of me, I couldn’t figure out why I didn’t get different results, using SQL Server 2005, for a simple Full-Text Search query and a Full-Text Search query using the FORMSOF and INFLECTIONAL keywords.

What I stumbled across eventually was that when creating and configuring my SQL Full-Text Indexes, I had left the language parameter as the default selection. When I changed this to English, voila!, my FORMSOF (INFLECTIONAL, @query) queries started to produces fantastic search results!

Also, an example query showing how to parameterize the the search term, and how to rank your results:

@query varchar (100)

SET @query = ‘FORMSOF (INFLECTIONAL, ‘ + @query + ‘)’

SELECT FT.rank, P.id, P.title
FROM Products P
INNER JOIN CONTAINSTABLE (Products, *, @query) AS FT ON P.id = FT.[key]

If you’ve any questions, I’ll do my best to help. Also, if you’re just starting with Full-Text, check out my posts on installing Full-Text Search on SQL Server 2005 and how to setup and configure SQL Server 2005 Express Full-Text Search the easy way.

del.icio.us:Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005 digg:Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005 spurl:Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005 furl:Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005 reddit:Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005 fark:Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005 Y!:Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005 magnolia:Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005
(will not be published)

2 Responses to 'Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005'

Subscribe to comments with RSS or TrackBack to 'Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005'.


  1. on January 9th, 2008 at 1:16pm

    […] For each column, select the column, and select the appropriate language To understand why the language parameter is important, see my post on use of the FORMSOF and INFLECTIONAL keywords in SQL Full-Text Search […]

  2. Sean said,

    on April 9th, 2008 at 9:21pm

    Is there a table that can be viewed to show what the variations of inflectional words are? I need to do inflectional searches based upon a list of about 400 words, but I don’t know if all of the words I’m expecting to be found will be.

Categories

Popular

Archive

Add to Technorati Favorites