Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-20-2011, 02:17 AM   PM User | #1
turpentyne
Regular Coder

 
Join Date: Aug 2010
Posts: 309
Thanks: 10
Thanked 1 Time in 1 Post
turpentyne is an unknown quantity at this point
fulltext settings

I've just started figuring out how to set up a php search that queries the database. I need to find how to change the default settings. I understand that the fulltext feature will only work on four or more characters. But it's a plant database and I have to change that to three so somebody can search for things like 'elm' or 'oak' or any other number of plants.

Also, is there a way to set exceptions for shorter items? strangely enough there's a scientific name for a plant that is just "aa." I'm sure there's other instances I'd need to enter an exception?

For reference, I'm working with MySQL 5.1 and using PHPMyAdmin
thanks!
turpentyne is offline   Reply With Quote
Old 11-20-2011, 05:30 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,375
Thanks: 18
Thanked 349 Times in 348 Posts
sunfighter is on a distinguished road
You need to post the search code.
sunfighter is offline   Reply With Quote
Old 11-20-2011, 07:21 PM   PM User | #3
Placido
New to the CF scene

 
Join Date: Nov 2011
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Placido is an unknown quantity at this point
You need to set the ft_min_word_len variable in my.ini file.

[mysqld]
ft_min_word_len=3
(or "2" if you plan to search two-letter words)

Detailed info is available here.

Hope this helps.
Placido is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:23 PM.


Advertisement
Log in to turn off these ads.