SQL Server 2005全文索引(full text search)
2010-10-25 22:14
363 查看
数据库提供全文索引已经很普及了,之前使用了PostgreSQL和MySQL的,今天尝试了SQL Server 2005。
首先新建一个数据库,在新建一个表格,选择Properties->Files,启用索引,
![](https://oscdn.geek-share.com/Uploads/Images/Content/202011/12/76f1e7941ff5c0bcfe842492cb453515.gif)
要建立索引,需要有有一个unique的列,我选择建立一个自动递增的整数列。在数据库的storage->Full Text Catalogs建立一个新的“full text search catalog”。选择你要建立索引的列,邮件点击新建“Fulltext Index…”。然后选择表格右键点击新建“Full-text Index”。
参考:
【1】http://www.developer.com/db/article.php/3446891/Understanding-SQL-Server-Full-Text-Indexing.htm
【2】http://aspalliance.com/1512_Understanding_Full_Text_Search_in_SQL_Server_2005.1
【3】http://www.kodyaz.com/articles/SQL-Server-Full-Text-Search-Indexing.aspx
首先新建一个数据库,在新建一个表格,选择Properties->Files,启用索引,
![](https://oscdn.geek-share.com/Uploads/Images/Content/202011/12/76f1e7941ff5c0bcfe842492cb453515.gif)
要建立索引,需要有有一个unique的列,我选择建立一个自动递增的整数列。在数据库的storage->Full Text Catalogs建立一个新的“full text search catalog”。选择你要建立索引的列,邮件点击新建“Fulltext Index…”。然后选择表格右键点击新建“Full-text Index”。
多个单词(短语)
同一个词根(英语适用)
不同单词设置权重
SELECT ProductName FROM Products WHERE CONTAINS(ProductName, 'ISABOUT (stout weight (.8), ale weight (.4), lager weight (.2) )' )
单词之间设定距离
SELECT ProductName FROM Products WHERE CONTAINS(ProductName, '"laugh*" NEAR lager')
参考:
【1】http://www.developer.com/db/article.php/3446891/Understanding-SQL-Server-Full-Text-Indexing.htm
【2】http://aspalliance.com/1512_Understanding_Full_Text_Search_in_SQL_Server_2005.1
【3】http://www.kodyaz.com/articles/SQL-Server-Full-Text-Search-Indexing.aspx
相关文章推荐
- SQL Server Full-Text Search
- Sql Server 2008 Full-text search Error: Word breaking timed out for the full-text query string.
- Extending SQL 2005 Fulltext Search
- SQL Server 2008 full-text search 全文检索的弱点(不支持后缀模糊查询)
- Extending SQL 2005 Fulltext Search (转载)
- SQL Server 2005 Full-Text Index 入门
- SQL Server 全文索引查询T-SQL学习笔记之一(Full-text index)
- SQL Server 2008 Full-Text Search Overview(SQL Server 2008全文检索概览)
- SQL Server 全文索引查询T-SQL学习笔记之二(Full-text index)
- Full Text Search in SQL 2005
- Fulltext Search for Firebird SQL
- sql server 2008 The fulltext filter daemon host (FDHost) process has stopped abnormally.
- 在mysql中使用全文索引fulltext|mysql,全文索引,fulltext
- SQL Server 2008 Full Text Searching SSMS Demo(SQL2008全文检索演示代码)(来自msdn)
- 在MYSQL中运用全文索引(FULLTEXT index)
- 如何获得数据库里有多少个全文索引。删除全文索引的方法 SQL server 2005
- Installation of Solr for full-text search purpose
- Full Text Search 实现Sort的实现方案
- Linq实践教程(1):一行代码实现DataTable全文搜索(Full Text Search)
- MySQL-创建和使用全文索引(FullText)