Enable Semantic Search on Tables and Columns
Describes how to enable or disable statistical semantic indexing on selected columns that contain documents or text.
Statistical Semantic Search uses the indexes that are created by Full-Text Search, and creates additional indexes. As a result of this dependency on full-text search, you create a new semantic index when you define a new full-text index, or when you alter an existing full-text index. You can create a new semantic index by using Transact-SQL statements, or by using the Full-Text Indexing Wizard and other dialog boxes in SQL Server Management Studio, as described in this topic.
Requirements and Restrictions for Creating a Semantic Index
-
You can create an index on any of the database objects that are supported for full-text indexing, including tables and indexed views.
-
Before you can enable semantic indexing for specific columns, the following prerequisites must exist:
-
A full-text catalog must exist for the database.
-
The table must have a full-text index.
-
The selected columns must participate in the full-text index.
You can create and enable all these requirements at the same time.
-
-
You can create a semantic index on columns that have any of the data types that are supported for full-text indexing. For more information, see Create and Manage Full-Text Indexes.
-
You can specify any document type that is supported for full-text indexing for varbinary(max) columns. For more information, see How To: Determine Which Document Types Can Be Indexed in this topic.
-
Semantic indexing creates two types of indexes for the columns that you select – an index of key phrases, and an index of document similarity. You cannot select only one type of index or the other when you enable semantic indexing. However you can query these two indexes independently. For more information, see Find Key Phrases in Documents with Semantic Search and Find Similar and Related Documents with Semantic Search.
-
If you do not explicitly specify an LCID for a semantic index, then only the primary language and its associated language statistics are used for semantic indexing.
-
If you specify a language for a column for which the language model is not available, the creation of the index fails and returns an error message.
How To: Create a Semantic Index When There Is No Full-Text Index
When you create a new full-text index with the CREATE FULLTEXT INDEX statement, you can enable semantic indexing at the column level by specifying the keyword STATISTICAL_SEMANTICS as part of the column definition. You can also enable semantic indexing when you use the Full-Text Indexing Wizard to create a new full-text index.
How To: Create a Semantic Index When There Is an Existing Full-Text Index
You can add semantic indexing when you alter an existing full-text index with the ALTER FULLTEXT INDEX statement. You can also add semantic indexing by using various dialog boxes in SQL Server Management Studio.
Requirements and Restrictions for Altering an Existing Index
-
You cannot alter an existing index while population of the index is in progress. For more information on monitoring the progress of index population, see Manage and Monitor Semantic Search.
-
You cannot add indexing to a column, and alter or drop indexing for the same column, in a single call to the ALTER FULLTEXT INDEX statement.
How to: Drop a Semantic Index
You can drop semantic indexing when you alter an existing full-text index with the ALTER FULLTEXT INDEX statement. You can also drop semantic indexing by using various dialog boxes in SQL Server Management Studio.
Requirements and Restrictions for Dropping a Semantic Index
-
You cannot drop full-text indexing from a column while retaining semantic indexing. Semantic indexing depends on full-text indexing for document similarity results.
-
You cannot specify the NO POPULATION option when you drop semantic indexing from the last column in a table for which semantic indexing was enabled. A population cycle is required to remove the results that were indexed previously.
How To: Check Which Languages Are Supported for Semantic Search
Important
|
|---|
|
Fewer languages are supported for semantic indexing than for full-text indexing. As a result, there may be columns that you can index for full-text search, but not for semantic search. |
Query the catalog view sys.fulltext_semantic_languages (Transact-SQL).
SELECT * FROM sys.fulltext_semantic_languages GO
The following languages are supported for semantic indexing. This list represents the output of the catalog view sys.fulltext_semantic_languages (Transact-SQL), ordered by LCID.
|
Language |
LCID |
|---|---|
|
German |
1031 |
|
English (US) |
1033 |
|
French |
1036 |
|
Italian |
1040 |
|
Portuguese (Brazil) |
1046 |
|
Russian |
1049 |
|
Swedish |
1053 |
|
English (UK) |
2057 |
|
Portuguese (Portugal) |
2070 |
|
Spanish |
3082 |
How To: Determine Which Document Types Can Be Indexed
Query the catalog view sys.fulltext_document_types (Transact-SQL).
If the document type that you want to index is not in the list of supported types, then you may have to locate, download, and install additional filters. For more information, see View or Change Registered Filters and Word Breakers.

Important