我如何启用?全文搜索安装在SQL Server 2014 Enterprise Edition中但未启用

时间:2017-11-22 19:37:42

标签: sql-server sql-server-2014 enterprise sql-server-2014-localdb

如何启用Full Text Search in SQL Server 2014

过去几个小时我一直在网上搜索,一些关于SQL Server 2012的帖子表示它在安装过程中的功能,但我去了那里,我没有选择启用它。 我确定它已经安装但未启用运行以下查询:

SELECT SERVERPROPERTY('IsFullTextInstalled') AS IsFullTextInstalled,
       DatabaseProperty(DB_NAME(DB_ID()), 'IsFulltextEnabled') AS IsFulltextEnabled

返回了:

IsFullTextInstalled=1
IsFullTextEnabled=0

谢谢!

1 个答案:

答案 0 :(得分:0)

您已完成实例的“已安装”部分。我认为“启用”与在实例中为特定数据库建立全文搜索有关,例如,使用T-SQL和AdventureWorks:

--create a full-text catalog
USE AdventureWorks;  
GO  
CREATE FULLTEXT CATALOG AdvWksDocFTCat;  

-- Ensure the table (Document in this example) has a unique, single-column, non-nullable index
CREATE UNIQUE INDEX ui_ukDoc ON Production.Document(DocumentID);  

-- Create a full-text index on the Document table
CREATE FULLTEXT INDEX ON Production.Document  
(  
    Document                         --Full-text index column name   
    TYPE COLUMN FileExtension    --Name of column that contains file type information
    Language 2057                 --2057 is the LCID for British English  
)  
KEY INDEX ui_ukDoc ON AdvWksDocFTCat --Unique index  
WITH CHANGE_TRACKING AUTO            --Population type;  
GO  

有关此示例的更多详细信息,请参阅Microsoft文章:https://docs.microsoft.com/en-us/sql/relational-databases/search/get-started-with-full-text-search

更广泛的教程:https://docs.microsoft.com/en-us/sql/relational-databases/search/create-and-manage-full-text-indexes