Wednesday 23 September 2009

Enabling or disabling full-text indexing

To identify full-text indexes on a server run:

SELECT 
  object_id, 
  OBJECT_NAME(OBJECT_ID) AS ObjectName, 
  is_enabled, 
  has_crawl_completed, 
  crawl_type, 
  crawl_type_desc, 
  * 
FROM sys.fulltext_indexes 

To enable an index run:

ALTER FULLTEXT INDEX ON [ObjectNameHere] ENABLE

To disable an index run:

ALTER FULLTEXT INDEX ON [ObjectNameHere] DISABLE

Note that [ObjectNameHere] should be replaced with the object name identified from the results of the first query.