SQLConfiguration SQLConfiguration


Full Text Searching  «Prev 

Full-text_index

The first parameter for the sp_fulltext_database system stored procedure is enable, indicating that we will enable the database for full-text searching.

The first parameter for the sp_fulltext_catalog system stored procedure is the name of the full-text catalog, Emp_Notes. The second parameter is the action to perform. In this case, we are creating the full-text catalog. We could have specified a root directory, but it is optional.

The first parameter is the table name, Employees, that is to have the index created. The second parameter is the action to perform. Because we are creating the index, the create action is specified. The third parameter is the name of the index to be created within the catalog, Emp_Notes. The fourth parameter is the name of the unique or primary key index that is used to build the full-text index. The example above is the primary key index, called PK_Employees.

The first parameter is the table name that contains the full-text index that you wish to add a column to. In this case, we are adding the column to the Employees table. Next, the second parameter is the column name to add. The above code adds the Notes column in the Employees table to the full-text index. The third parameter indicates the action to perform, add.

sp_fulltext_table Employees, 'activate'
The first parameter is the table name, Employees, that contains the full-text index you wish to activate. The second parameter is the action to be performed. Because we wish to activate the full-text searching capabilities and all other steps have been performed, we specified the action parameter of activate.