MySQL doesn't index the special characters, some of which are considered word separators, like the period. MySQL indexes words, not strings (sort of). I had a similar problem on one of my projects where I needed to index resumes for searching. Typical searches would include C++, C#, .NET, etc. None of which mysql would index. What I did was created a word conversion list and added a search words field to the database. The search words field would contain the problematic search words into strings that MySQL would index (CPlusPlus, CSharp, dotNET, etc). The full text index would then be a compound index of the original text plus the search words field. The front end would handle searching the text for conversion words before inserting/updating the database. It would then convert the problematic words that were present and populate the search words field with them. The front would also do a similar conversion when a user entered a search for one of those words. It's not perfect, but I always used boolean full text searching and MySQL does support proximity searches, so it worked well enough. Although I never did figure out how to search on C, J, or any other single character programming language.

Hope that gives you some ideas.

----- Original Message ----- From: "Harini Raghavan" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Thursday, July 06, 2006 2:06 AM
Subject: special char in full-text search


Hi All,

I am using the MySQL full text search capability in the search workflow in my appplication. I found that MySQL treats special character like *./,* etc. as tokenizers if they are not specified within a phrase(inside double quotes). For ex. If the search string entered is M.B.A or 24/7 then it searches for M, B, and A sepearately. I can't include the quotes for all search strings as wild char(*) search would not work when specified within a phrase. Is there a way to avoid MySQL from tokenizing the search criteria?
Any ideas?

Thanks,
Harini

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to