Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

if i have table data that is indexed using full text search in Microsoft SQL server 2005 that includes raw table data such as "test2" should a query using FTS find a match if the search string is "test"?

share|improve this question
    
please update question to include the sql query you are using for this search. –  Coder Hawk May 13 '11 at 19:35
add comment

2 Answers

up vote 1 down vote accepted

Yes you can use full text search in this case.

Select * from your_table WHERE CONTAINS(your_column, '"test*"' );

will find test2.

See section

C. Using CONTAINS with prefix_term in msdn

share|improve this answer
add comment

Full text search does allow certain types of near hits, similar terms, thesaurus etc. as outlined here: http://msdn.microsoft.com/en-us/library/cc879300.aspx

This may be specifically helpful. http://msdn.microsoft.com/en-us/library/ms142492.aspx

But most people end up using a traditional like statement to get partial matches as you have to format the full text query expecting that what was passed was potentially a prefix.

share|improve this answer
1  
I wrote an application once where I wanted to support all the features of FTS. I ended up having to outline in the user manual that users would need to pass quotes, wildcards, and specific syntax themselves in order to do fuzzy searches. Some power users of the application were able to figure it out but most users never took advantage and then also complained that the index wasn't very good. Google has made search expectations pretty lofty for most lay-users. –  RThomas May 13 '11 at 19:41
add comment

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.