开发者

SQL SERVER FULL-TEXT INDEX, CONTAINS return empty

I got a issue about full index, any body can help me on this?

1) set up full text index

CREATE FULLTEXT INDEX ON dbo.Companies(my table name)
(
CompanyName(colum of my table) 
Language 0X0
)
KEY INDEX IX_Companies_CompanyAlias ON QuestionsDB
WITH CHANGE_TRACKING AUTO
GO

2) Using CONTAINS to find the matched rows

SELECT开发者_运维技巧 CompanyId, CompanyName
FROM dbo.Companies
WHERE CONTAINS(CompanyName,'Micro')

3) All is going well. just just just return empty resultset. And I am sure there is company with CompanyName "Microsoft" in Table Company

Much appreciated if anybody does me a favor on this.


Your CONTAINS(CompanyName,'Micro') is looking for the word Micro, if you want a prefix match to pick up "Microsoft" use the syntax: CONTAINS(CompanyName,'"Micro*"').

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜