ALTER FULLTEXT INDEX (Transact-SQL)
Changes the properties of a full-text index.
ALTER FULLTEXT INDEX ON table_name
{ ENABLE
| DISABLE
| SET CHANGE_TRACKING [ = ] { MANUAL | AUTO | OFF }
| ADD ( column_name
[ TYPE COLUMN type_column_name ]
[ LANGUAGE language_term ]
[ STATISTICAL_SEMANTICS ]
[,...n] )
[ WITH NO POPULATION ]
| ALTER COLUMN column_name
{ ADD | DROP } STATISTICAL_SEMANTICS
[ WITH NO POPULATION ]
| DROP ( column_name [,...n] )
[ WITH NO POPULATION ]
| START { FULL | INCREMENTAL | UPDATE } POPULATION
| {STOP | PAUSE | RESUME } POPULATION
| SET STOPLIST [ = ] { OFF| SYSTEM | stoplist_name }
[ WITH NO POPULATION ]
| SET SEARCH PROPERTY LIST [ = ] { OFF | property_list_name }
[ WITH NO POPULATION ]
}
[;]
Interactions of Change Tracking and NO POPULATION Parameter
Whether the full-text index is populated depends on whether change-tracking is enabled and whether WITH NO POPULATION is specified in the ALTER FULLTEXT INDEX statement. The following table summarizes the result of their interaction.
|
Change Tracking |
WITH NO POPULATION |
Result |
|---|---|---|
|
Not Enabled |
Not specified |
A full population is performed on the index. |
|
Not Enabled |
Specified |
No population of the index occurs until an ALTER FULLTEXT INDEX...START POPULATION statement is issued. |
|
Enabled |
Specified |
An error is raised, and the index is not altered. |
|
Enabled |
Not specified |
A full population is performed on the index. |
For more information about populating full-text indexes, see Populate Full-Text Indexes.
Changing the Search Property List Causes Rebuilding the Index
The first time that a full-text index is associated with a search property list, the index must be repopulated to index property-specific search terms. The existing index data is not truncated.
However, if you associate the full-text index with a different property list, the index is rebuilt. Rebuilding immediately truncates the full-text index, removing all existing data, and the index must be repopulated. While the population progresses, full-text queries on the base table search only on the the table rows that have already been indexed by the population. The repopulated index data will include metadata from the registered properties of the newly added search property list.
Scenarios that cause rebuilding include:
-
Switching directly to a different search property list (see "Scenario A," later in this section).
-
Turning off the search property list and later associating the index with any search property list (see "Scenario B," later in this section)
Note
|
|---|
|
For more information about how full-text search works with search property lists, see Search Document Properties with Search Property Lists. For information about full populations, see Populate Full-Text Indexes. |
Scenario A: Switching Directly to a Different Search Property List
-
A full-text index is created on table_1 with a search property list spl_1:
CREATE FULLTEXT INDEX ON table_1 (column_name) KEY INDEX unique_key_index WITH SEARCH PROPERTY LIST=spl_1, CHANGE_TRACKING OFF, NO POPULATION;
-
A full population is run on the full-text index:
ALTER FULLTEXT INDEX ON table_1 START FULL POPULATION;
-
The full-text index is later associated a different search property list, spl_2, using the following statement:
ALTER FULLTEXT INDEX ON table_1 SET SEARCH PROPERTY LIST spl_2;
This statement causes a full population, the default behavior. However, before beginning this population, the Full-Text Engine automatically truncates the index.
Scenario B: Turning Off the Search Property List and Later Associating the Index with Any Search Property List
-
A full-text index is created on table_1 with a search property list spl_1, followed by an automatic full population (the default behavior):
CREATE FULLTEXT INDEX ON table_1 (column_name) KEY INDEX unique_key_index WITH SEARCH PROPERTY LIST=spl_1; -
The search property list is turned off, as follows:
ALTER FULLTEXT INDEX ON table_1 SET SEARCH PROPERTY LIST OFF WITH NO POPULATION;
-
The full-text index is once more associated either the same search property list or a different one.
For example the following statement re-associates the full-text index with the original search property list, spl_1:
ALTER FULLTEXT INDEX ON table_1 SET SEARCH PROPERTY LIST spl_1;
This statement starts a full population, the default behavior.
Note
The rebuild would also be required for a different search property list, such as spl_2.
The user must have ALTER permission on the table or indexed view, or be a member of the sysadmin fixed server role, or the db_ddladmin or db_owner fixed database roles.
If SET STOPLIST is specified, the user must have REFERENCES permission on the stoplist. If SET SEARCH PROPERTY LIST is specified, the user must have REFERENCES permission on the search property list. The owner of the specified stoplist or search property list can grant REFERENCES permission, if the owner has ALTER FULLTEXT CATALOG permissions.
Note
|
|---|
|
The public is granted REFERENCES permission to the default stoplist that is shipped with SQL Server. |
A. Setting manual change tracking
The following example sets manual change tracking on the full-text index on the JobCandidate table of the AdventureWorks database.
USE AdventureWorks; GO ALTER FULLTEXT INDEX ON HumanResources.JobCandidate SET CHANGE_TRACKING MANUAL; GO
B. Associating a property list with a full-text index
The following example associates the DocumentPropertyList property list with the full-text index on the Production.Document table of the AdventureWorks database. This ALTER FULLTEXT INDEX statement starts a full population, which is the default behavior of the SET SEARCH PROPERTY LIST clause.
Note
|
|---|
|
For an example that creates the DocumentPropertyList property list, see CREATE SEARCH PROPERTY LIST (Transact-SQL). |
USE AdventureWorks; GO ALTER FULLTEXT INDEX ON Production.Document SET SEARCH PROPERTY LIST DocumentPropertyList; GO
C. Removing a search property list
The following example removes the DocumentPropertyList property list from the full-text index on the Production.Document table of the AdventureWorks database. In this example, there is no hurry for removing the properties from the index, so the WITH NO POPULATION option is specified. However, property-level searching is longer allowed against this full-text index.
USE AdventureWorks; GO ALTER FULLTEXT INDEX ON Production.Document SET SEARCH PROPERTY LIST OFF WITH NO POPULATION; GO
D. Starting a full population
The following example starts a full population on the full-text index on the JobCandidate table of the AdventureWorks database.
USE AdventureWorks; GO ALTER FULLTEXT INDEX ON HumanResources.JobCandidate START FULL POPULATION; GO

Important