CREATE SEARCH PROPERTY LIST (Transact-SQL)
Creates a new search property list. A search property list is used to specify one or more search properties that you want to include in a full-text index.
Important
|
|---|
|
CREATE SEARCH PROPERTY LIST, ALTER SEARCH PROPERTY LIST, and DROP SEARCH PROPERTY LIST are supported only under compatibility level 110. Under lower compatibility levels, these statements are not supported. |
Note
|
|---|
|
For information about property lists in general, see Search Document Properties with Search Property Lists. |
By default, a new search property list is empty and you must alter it to manually to add one or more search properties. Alternatively, you can copy an existing search property list. In this case, the new list inherits the search properties of its source, but you can alter the new list to add or remove search properties. Any properties in the search property list at the time of the next full population are included in the full-text index.
A CREATE SEARCH PROPERTY LIST statement fails under any of the following conditions:
-
If the database specified by database_name does not exist.
-
If the list specified by source_list_name does not exist.
-
If you do not have the correct permissions.
To add or remove properties from a list
-
To drop a property list
Requires CREATE FULLTEXT CATALOG permissions in the current database and REFERENCES permissions on any database from which you copy a source property list.
Note
|
|---|
|
REFERENCES permission is required to associate the list with a full-text index. CONTROL permission is required to add and remove properties or drop the list. The property list owner can grant REFERENCES or CONTROL permissions on the list. Users with CONTROL permission can also grant REFERENCES permission to other users. |
A. Creating an empty property list and associating it with an index
The following example creates a new search property list named DocumentPropertyList. The example then uses an ALTER FULLTEXT INDEX statement to associate the new property list with the full-text index of the Production.Document table in the AdventureWorks database, without starting a population.
Note
|
|---|
|
For an example that adds several predefined, well-known search properties to this search property list, see ALTER SEARCH PROPERTY LIST (Transact-SQL). After adding search properties to the list, the database administrator would need to use another ALTER FULLTEXT INDEX statement with the START FULL POPULATION clause. |
CREATE SEARCH PROPERTY LIST DocumentPropertyList; GO USE AdventureWorks; ALTER FULLTEXT INDEX ON Production.Document SET SEARCH PROPERTY LIST DocumentPropertyList WITH NO POPULATION; GO
B. Creating a property list from an existing one
The following example creates a new the search property list, JobCandidateProperties, from the list created by Example A, DocumentPropertyList, which is associated with a full-text index in the AdventureWorks database. The example then uses an ALTER FULLTEXT INDEX statement to associate the new property list with the full-text index of the HumanResources.JobCandidate table in the AdventureWorks database. This ALTER FULLTEXT INDEX statement starts a full population, which is the default behavior of the SET SEARCH PROPERTY LIST clause.
CREATE SEARCH PROPERTY LIST JobCandidateProperties FROM AdventureWorks.DocumentPropertyList; GO ALTER FULLTEXT INDEX ON HumanResources.JobCandidate SET SEARCH PROPERTY LIST JobCandidateProperties; GO
Important