Create and Manage Full-Text Catalogs
Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance
A full-text catalog is a logical container for a group of full-text indexes. You have to create a full-text catalog before you can create a full-text index.
A full-text catalog is a virtual object that does not belong to any filegroup.
Create a Full-Text Catalog
Create a full-text catalog with Transact-SQL
Use CREATE FULLTEXT CATALOG. For example:
USE AdventureWorks;
GO
CREATE FULLTEXT CATALOG ftCatalog AS DEFAULT;
GO
Create a full-text catalog with Management Studio
In Object Explorer, expand the server, expand Databases, and expand the database in which you want to create the full-text catalog.
Expand Storage, and then right-click Full Text Catalogs.
Select New Full-Text Catalog.
In the New Full-Text Catalog dialog box, specify the information for the catalog that you are re-creating. For more information, see New Full-Text Catalog (General Page).
Note
Full-text catalog IDs begin at 00005 and are incremented by one for each new catalog created.
Select OK.
Get the properties of a full-text catalog
Use the Transact-SQL function FULLTEXTCATALOGPROPERTY to get the value of various properties related to full-text catalogs. For more info, see FULLTEXTCATALOGPROPERTY.
For example, run the following query to get the count of indexes in the full-text catalog Catalog1
.
USE <database>;
GO
SELECT fulltextcatalogproperty('Catalog1', 'ItemCount');
GO
The following table lists the properties that are related to full-text catalogs. This information may be useful for administering and troubleshooting full-text search.
Property | Description |
---|---|
AccentSensitivity | Accent-sensitivity setting. |
ImportStatus | Whether the full-text catalog is being imported. |
IndexSize | Size of the full-text catalog in megabytes (MB). |
ItemCount | Number of full-text indexed items currently in the full-text catalog. |
MergeStatus | Whether a master merge is in progress. |
PopulateCompletionAge | Difference in seconds between the completion of the last full-text index population and 01/01/1990 00:00:00. |
PopulateStatus | Populate status. This feature will be removed in a future version of SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. |
UniqueKeyCount | Number of unique keys in the full-text catalog. |
Rebuild a full-text catalog
Run the Transact-SQL statement ALTER FULLTEXT CATALOG ... REBUILD, or do the following things in SQL Server Management Studio (SSMS).
In SSMS, in Object Explorer, expand the server, expand Databases, and then expand the database that contains the full-text catalog that you want to rebuild.
Expand Storage, and then expand Full Text Catalogs.
Right-click the name of the full-text catalog that you want to rebuild, and select Rebuild.
To the question Do you want to delete the full-text catalog and rebuild it?, click OK.
In the Rebuild Full-Text Catalog dialog box, click Close.
Rebuild all full-text catalogs for a database
In SSMS, in Object Explorer, expand the server, expand Databases, and then expand the database that contains the full-text catalogs that you want to rebuild.
Expand Storage, and then right-click Full Text Catalogs.
Select Rebuild All.
To the question, Do you want to delete all full-text catalogs and rebuild them?, click OK.
In the Rebuild All Full-Text Catalogs dialog box, click Close.
Remove a full-text catalog from a database
Run the Transact-SQL statement DROP FULLTEXT CATALOG, or do the following things in SQL Server Management Studio (SSMS).
In SSMS, in Object Explorer, expand the server, expand Databases, and expand the database that contains the full-text catalog you want to remove.
Expand Storage, and expand Full Text Catalogs.
Right-click the full-text catalog that you want to remove, and then select Delete.
In the Delete Objects dialog box, click OK.