Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Does SQL Server only look at its full text catalog when there is a CONTAINS in the query? Or would it also do that for a LIKE query?

Background: Our application used to use Full Text Catalogs in SQL Server and CONTAINS queries to do Full Text Searching. Last year we switched to Lucene and do all of our own indexing now. So we no longer rely on the Full Text Catalog (in fact we remove it).

A customer claims they turned on the Full Text Indexing in SQL Server and now our app is returning hits for queries that it wasn't before. There are absolutely ZERO sql queries run against our db with the CONTAINS clause, so I just wanted to verify that this is the only SQL clause that cause SQL Server to look at a Full Text Catalog.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Full text search will hit the catalogs for full text search queries only (CONTAINS, CONTAINSTABLE, FREETEXTTABLE, FREETEXT). LIKE will never consult a full-text index.

http://msdn.microsoft.com/en-us/library/cc879300.aspx

Have you tested the reported behaviour yourselves?

share|improve this answer

Incase interested, Just check out this video tutorial which explains in depth about FULLTEXT Search and difference between LIKE predicate and predicates which hit FT Catalog like FREETEXT and CONTAINS.

Video - Intro to Full Text Search URL - http://wtv.watchtechvideos.com/topic231.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.