Full Text search in SQL Server 2005/2008
I am bit confused about the Full Text search in SQL Server 2005/2008. What I understand with this is that if use has entered a complete line [let say someone searched for - "BMW Europe edition 2010"]. Than full text search will se开发者_如何学编程arch & break this query and search it on the columns we specified [Let say we defined the column - Carname, Country, Year]. So the result set will be the list of all cars which either contains BMW, Europe or 2010, all or any two.
Am I correct? If not please let me know the feature and use of Full Text Search as I am novice in SQL Server.
Also, id there any other kind of search available in SQL Server 2005/2008 edition.
You can find more about full text search at below mentioned URL.
http://blog.sqlauthority.com/2008/09/05/sql-server-creating-full-text-catalog-and-index/
http://blog.sqlauthority.com/2009/12/26/sql-server-whitepaper-sql-server-2008-full-text-search-internals-and-enhancements/
You're right, also full text search is very fast. Also you can use like
search:
select id from articles where text like '%some text%'
Otherwise we can user select id from articles where text contains('some text')
but here in this case id column should be indexed
EXEC sp_fulltext_database 'enable'
go
CREATE FULLTEXT CATALOG mycatalogName
go
CREATE NONCLUSTERED INDEX primaryKeyIndexName
ON FAQ (pkColumnName);
CREATE FULLTEXT INDEX ON dbo.TableName
(
Question
Language 0X0
)
KEY INDEX PK_TableName ON mycatalogName
WITH CHANGE_TRACKING AUTO
references:
http://dotnetacademy.blogspot.com/2010/10/fulltext-search-in-sql-server.html
http://blog.sqlauthority.com/2008/09/05/sql-server-creating-full-text-catalog-and-index/
To get more details about what is fulltext search please refer:
http://msdn.microsoft.com/en-us/library/ms142571.aspx
精彩评论