4, December 2008

min word length with fulletext search - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  Databases  >  MySQL
Topic: min word length with fulletext search
« previous next »
Pages: [1] Print

Author Topic: min word length with fulletext search  (Read 1079 times)
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6486
39748 credits
Members referred : 374


It's time to use PHP5!


« on: Oct 03, 2007, 11:28:16 PM »

Hi,

I need to use the full text search feature on some reseller machine. Now I need to lower the value for the minimun string length in searches:

from the manual:
Quote
The minimum and maximum lengths of words to be indexed are defined by the ft_min_word_len and ft_max_word_len system variables. (See Section 5.2.3, “System Variables”.) The default minimum value is four characters; the default maximum is version dependent. If you change either value, you must rebuild your FULLTEXT indexes. For example, if you want three-character words to be searchable, you can set the ft_min_word_len variable by putting the following lines in an option file:

[mysqld]
ft_min_word_len=3


what does they mean with "putting the following lines in an option file:"

where and how to place an option file?


Last blog : Just a better Internet portal provided by Google
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8269
42601 credits
Members referred : 3



« Reply #1 on: Oct 03, 2007, 11:33:56 PM »

The option file is the my.cnf. As this is a reseller machine and you don't have root access, you can try to execute this query:

Quote
SET GLOBAL ft_min_word_len=3

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6486
39748 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Oct 04, 2007, 09:30:27 AM »

Thanks,

will say I have to use this query before every search query?


Last blog : Just a better Internet portal provided by Google
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6486
39748 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Oct 04, 2007, 10:32:39 AM »

no success...

Quote
Error

SQL query:

SET GLOBAL ft_min_word_len =3

MySQL said: Documentation
#1193 - Unknown system variable 'ft_min_word_len'


Last blog : Just a better Internet portal provided by Google
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8269
42601 credits
Members referred : 3



« Reply #4 on: Oct 04, 2007, 11:59:07 AM »

The query I gave you is to set the variable, and yes - if it worked - you should use it whenever you start a connection.

Now this is not working because your host maybe has a lower version of mysql?

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6486
39748 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Oct 04, 2007, 12:00:55 PM »


Now this is not working because your host maybe has a lower version of mysql?

no, I use mysql5


Last blog : Just a better Internet portal provided by Google
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8269
42601 credits
Members referred : 3



« Reply #6 on: Oct 04, 2007, 12:09:27 PM »

I am not sure about this. Maybe only the root user has rights to play with these variables.

Have you contact your host?

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6486
39748 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Oct 04, 2007, 12:12:52 PM »

I am not sure about this. Maybe only the root user has rights to play with these variables.

Have you contact your host?

yes I send them an email yesterday, I think they need to place an option file for one of my db users or I need to take a VPS (is a VPS good for fulltext searches in a table with 1.5mio records?)


Last blog : Just a better Internet portal provided by Google
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8269
42601 credits
Members referred : 3



« Reply #8 on: Oct 04, 2007, 12:21:26 PM »

No VPS wont be good for that Smiley

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6486
39748 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Oct 04, 2007, 12:25:35 PM »

No VPS wont be good for that Smiley
I need a server with more memory right?


Last blog : Just a better Internet portal provided by Google
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8269
42601 credits
Members referred : 3



« Reply #10 on: Oct 05, 2007, 12:33:15 PM »

I think full text search requires both memory and processing capabilities.

Of course you can use some way to cache results and this will help you use less resources.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7186
Tags : mysql fulltext Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  Databases  >  MySQL
Topic: min word length with fulletext search
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Dec 04, 2008, 01:20:12 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!





Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.