Current location: Hot Scripts Forums » Other Discussions » Database » Intelligent accent search (mySQL)


Intelligent accent search (mySQL)

Reply
  #1 (permalink)  
Old 08-27-08, 01:41 AM
andrewgerm andrewgerm is offline
Newbie Coder
 
Join Date: Jul 2008
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Intelligent accent search (mySQL)

Good day all

I was wondering if there is a way to have mySQL read accents in a word as just the plain letter? I.e. if a user searches for a word with é in it, but only types e in their search, how would I find that? I don't want to assume my users will type in the correct accents. At the moment my primary search is using boolean mode.

Would all this work any better as a stored procedure? This is on a shared Internet host, so speed, and bandwidth conservation are important.

Thanks in advance for any suggestions...
Reply With Quote
  #2 (permalink)  
Old 08-27-08, 02:31 AM
sandeep.kumar's Avatar
sandeep.kumar sandeep.kumar is offline
Wannabe Coder
 
Join Date: Jun 2008
Location: India
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
A couple points about Full-Text searching in MySQL:

* Searches are not case sensitive
* Short words are ignored, the default minimum length is 4 characters. You can change the min and max word length with the variables ft_min_word_len and ft_max_word_len
* Words called stopwords are ignored, you can specify your own stopwords, but default words include the, have, some - see default stopwords list.
* You can disable stopwords by setting the variable ft_stopword_file to an empty string.
* Full Text searching is only supported by the MyISAM storage engine.
* If a word is present in more than 50% of the rows it will have a weight of zero. This has advantages on large datasets, but can make testing difficult on small ones.

This link might be useful to you.

http://www.petefreitag.com/item/477.cfm
Reply With Quote
  #3 (permalink)  
Old 08-27-08, 06:25 AM
andrewgerm andrewgerm is offline
Newbie Coder
 
Join Date: Jul 2008
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for the reply Sandeep

The full-text searching is actually great, and I'm impressed by the speed. My only concern now, while watching a few users, was that they would have to look up the ascii code for any special characters if they wanted to search on those. These mostly pertain to people names in the database. I had been hoping they could type in something like 'e' instead of 'é' and have mySQL search on that too.

Any other tips from anyone welcome. It would be great if mySQL could handle that, so I don't have to write my own function...
Reply With Quote
  #4 (permalink)  
Old 08-28-08, 07:23 AM
sandeep.kumar's Avatar
sandeep.kumar sandeep.kumar is offline
Wannabe Coder
 
Join Date: Jun 2008
Location: India
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Try to use MySQL's SOUNDEX function.

These link might be useful to you.

http://jgeewax.wordpress.com/2006/07...ches-in-mysql/


http://www.java2s.com/Code/Oracle/Ch...OUNDEXLari.htm
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL; Search For Most Similar cardine Database 3 05-14-06 11:00 AM
Mysql Search Output Question doveroh PHP 0 02-15-05 07:39 PM
How to create a php mysql site searchable from search engines? Klesti PHP 2 05-16-04 04:09 PM
Declared Functions skipper23 PHP 4 12-17-03 10:06 AM
index page not showing up skipper23 PHP 3 12-15-03 01:10 PM


All times are GMT -5. The time now is 05:04 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.