asp.net - How do I handle an apostrophe (') in MS SQL 2008 FTS? -
I have a website that uses MS SQL 2008 FTS (full text search). This search works fine if a user searches for a string like which is for a string - it returns any results with that is , If a user searches for thats , and searches for the database that , its results will not return.
In addition, ideally and that , etc
anybody should know that FTS supports this And what can I do to enable
A parameter Use
myCommand.Parameters.AddWithValue ("@ searchterm", txtSearch.Text.Trim ());
This will handle you without any hassle.
In relation to that, it is more that you should search for keywords
Updated This is a great thing about a TFS team member.
It is cited:
Daniel is correct Full Text Search (FTS) does not directly use SOUNDEX, but it can be used in conjunction with SOUNDEX < Br> In addition, you can access the following links as well as CONTAINS & amp; SOUNDEX
You might want to see some strong sound algorithms as well as the Levensteinline algorithm - you should be able to search Google for example: "Metafone SoundX "SQL Server" Find Fuzzy Name "and found me quickly -" Double Metaphon Sound Great "
You can easily download code in a zip file with many user-defined functions (UDF) which Double metafone Let's apply
Below are some additional sound links:
(left out of scoop)
Use Pub - Combined sound or included - Search for sounds like "Michael" - Select authors - au_lname, au_fname - Returns 2 rows where in WHERE (au_fname, 'Mich * ') Or SOUNDEX (au_fname) =' M240 '
thanks,
john
sql full text search blog
Comments
Post a Comment