Archive

Posts Tagged ‘Fuzzy Search’

Full-Text in SQL Express

In order to perform full text search in SQL 2005 or 2008 you need to create a catalog and define the fields to be indexed for full text search. The difficultyis that if you are using SQL Express you will realize that the steps and menus which are explained in http://msdn.microsoft.com/en-us/library/bb326035.aspx is not available for you. So the only way to prepare your database is using SQL Statements. In summary the following steps are needed:

  1. Disable user instances: sp_configure ‘user instances enabled’,0
  2. Make sure your database has full-text search enabled, by checking the “use full-text indexing” in database properties, Going to “Files” and checking the “use full-text indexing” option
  3. Create catalogue: CREATE FULLTEXT CATALOG MyFullTextCatalog
  4. CREATE FULLTEXT INDEX ON Production.ProductReview(Comments)
    KEY INDEX ui_ProductReview ON MyFullTextCatalog
    WITH CHANGE_TRACKING AUTO

Important: the table should have unique intexed not-null field.

You can find a more comprehensive instruction in http://rpsetzer.wordpress.com/2007/01/24/configuring-and-using-full-text-search-in-sql-server-2005-express-edition/

Other articles to read:

Getting Started with Full-Text Search

CREATE FULLTEXT INDEX (Transact-SQL)

Full-Text Sql Search Tips