Creative ways to get around fulltext 4 char limitation?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Creative ways to get around fulltext 4 char limitation?

Post by voltrader »

I'm running MySQL 3.23, so it seems I can't change the ft_min_word_len variable to 3.

Are there any creative ways to do this?

There are so many 3-letter words that people search for... sigh...
MrKnight
Forum Newbie
Posts: 22
Joined: Fri Jan 28, 2005 8:54 am
Location: Another Planet

Post by MrKnight »

User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Read the documentation on Full Text Search. Somewhere in there I believe there are instructions on how to change the limit - it's just in a config file I think.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Post by voltrader »

I did read the manual. First thing I did.

"I'm running MySQL 3.23, so it seems I can't change the ft_min_word_len variable to 3. "
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Post by voltrader »

You're ignoring what I wrote. I stated that I DID read the manual.

This is the gist of my post:
"I'm running MySQL 3.23, so it seems I can't change the ft_min_word_len variable to 3. "

This is from the manual:
"The minimum and maximum length of words to be indexed is defined by the ft_min_word_len and ft_max_word_len system variables (available as of MySQL 4.0.0)"

MySQL 3.23 vs MySQL 4.0.0
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I wasn't ignoring your post, I was being a total knob by not even reading it. My apologies. :oops:

What if you padded your 3 character search strings with spaces. If I'm searching for 'IRA', 'IRA ' should also work should it not?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Post by voltrader »

You redeemed yourself with that one post :!:

In all seriousness, that's a good idea. I had heard the append-*-to-end-of-string idea, but I didn't want completely irrelevant results.

I'll report back on how "xxx " (+ space) matches with xxx in practice.
Post Reply