How does SQL Full-text search consider the word "what's" while searching
-
Monday, June 25, 2012 6:13 PM
Hi everyone,
When I tried to search with the search key "what'a" through my application, I am getting no result.
I cannot change my application. However want to know the root cause/reason.
Please let me know the logic.functionality of the SQL2008 while searching using what's
Thanks in advance,
Chanakya
All Replies
-
Tuesday, June 26, 2012 10:01 PM
With SQL Server 2008 and forward some new functions were added for full text indexes. One function, sys.dm_fts_parser, allows you to submit a string and see exactly how it parses. For example, a version of code that I have posted before:
select * from sys.dm_fts_parser('"what''s under_under dash-dash period.period comma,comma exclam!exclam at@at hash#hash crlf crlf tab tab dollar$dollar caret^caret and&and star*star lparen(lparen rparen)rparen plus+plus equal=equal lcurl{lculr rcurl}rculr lbrack[lbrack rbrack]rbrack or|or lslash\lslash rslash/rslash colon:colon semic;semic quote''quote dquote""dquote less<less great>great quest?quest grave`grave tilde~tilde 1,2 3.4 5:6 7-8 9*10 11/12 1,a 3.b 5:c 7-d 9*e 11/f 100$100 12''12 12""12 34$56.00 $78.90" ', 1033,--American English NULL,--No stop words 0)--Accent Insensitive
In this case, using American English, without stop words, "what's" gives me "what's" and "what". You can change those last 3 parameters to match your environment (perhaps you have stop words, etc) and see what your string parses to.
RLF
- Edited by Russell FieldsMVP Tuesday, June 26, 2012 10:02 PM
- Marked As Answer by Iric WenModerator Wednesday, July 04, 2012 2:26 AM

