问题描述
-
确保您已安装全文搜索功能。
-
创建全文搜索索引。
在Production.ProductDescription上创建全文索引(描述)
key索引PK_ProductDescription_ProductDescriptionID
在创建索引之前,请确保:
- 由于在表格上只允许使用一个全文搜索索引,因此表格中没有全文搜索索引
- 表格中存在唯一索引。索引必须基于单键列,不允许NULL。
- 存在全文目录。如果没有默认全文目录,则必须明确指定全文目录名称。 您可以做SQL Sever Management Studio中的第2步和第3步。在对象浏览器中,右键单击表格,选择 Make sure you have full-text search feature installed.
Create full-text search catalog.
use AdventureWorks create fulltext catalog FullTextCatalog as default select * from sys.fulltext_catalogs
Create full-text search index.
create fulltext index on Production.ProductDescription(Description) key index PK_ProductDescription_ProductDescriptionID
Before you create the index, make sure:
- you don't already have full-text search index on the table as only one full-text search index allowed on a table
- a unique index exists on the table. The index must be based on single-key column, that does not allow NULL.
- full-text catalog exists. You have to specify full-text catalog name explicitly if there is no default full-text catalog.
使用AdventureWorks
创建全文目录FullTextCatalog作为默认值
从sys.fulltext_catalogs中选择*
全文索引
菜单项,然后选择定义全文索引...
子菜单项。全文索引向导将指导您完成整个过程。它还会为你创建一个全文搜索目录,如果你还没有。 你可以在
I am getting following error in my SQL server 2008 R2 database:
You can do step 2 and 3 in SQL Sever Management Studio. In object explorer, right click on a table, select Full-Text index
menu item and then Define Full-Text Index...
sub-menu item. Full-Text indexing wizard will guide you through the process. It will also create a full-text search catalog for you if you don't have any yet.
You can find more info at MSDN
这篇关于不能在表或索引视图上使用CONTAINS或FREETEXT谓词,因为它不是全文索引的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!