Wednesday, August 25, 2010

Code: FullText Search in SQL Server 2008 Express

In order to do full text search in SQL Server 2008 Express (Original or R2) you have to install the "Advanced Services". You can find the download for original here or R2 here.




After upgrading your current instance (or installing the new instance) you also need to make sure the Full Text service is enabled

You can then follow this guide to add a full text catalog and index.

If you are using SSMS and want the full text index scripts to be generated when you generate the create script for a table, you'll need to modify a setting.  Go to  Tools | Options - Scripting page and then scroll down to table options and select "Script full-text indexes". This will script the full-text indexes with the table definition.

If you are using the scripts then in a Visual Studio Database project, don't forget to set the Build Action property of the file to "Build", otherwise it will drop the indexes when it deploys