views:

385

answers:

2

I'm using SQL Server 2008 and I would like to use a sproc to tell the database to populate a full-text index.

If available, I'd like to know what the sprocs are for the following actions:

  • adding an entry into the index
  • removing an entry into the index
  • full populate
A: 

fulltext indexing does this automatically for you. So you either:

  • manually repopulate the index

or

  • set the index to auto-populate, and then you have the option to do this in the background (preferred)

The last option is the best, you simply have a set/forget system: when rows are changed/removed/added, the system takes care of the index, you don't have to do that.

Frans Bouma
Please answer the question. I'm looking for sprocs to manually control the population of a full text index.I'm fully aware that full text indexing already can populate for me.
ajma
I DID answer your question. I.o.w.: you don't NEED the procs, it's been taken care of for you and you can't control it by proc calling.
Frans Bouma
+1  A: 

sp_fulltext_catalog is what you're looking for.

From Books Online, if you were looking to rebuild (this a drop and create) a full-text catalog named Cat_Desc in the AdventureWorks database...

USE AdventureWorks;
GO
EXEC sp_fulltext_catalog 'Cat_Desc', 'rebuild';
GO

If you wanted to start full population of said catalog...

USE AdventureWorks;
GO
EXEC sp_fulltext_catalog 'Cat_Desc', 'start_full';
GO

If you wanted to perform incremental population of said catalog...

USE AdventureWorks;
GO
EXEC sp_fulltext_catalog 'Cat_Desc', 'start_incremental';
GO
The Lazy DBA