28, May 2012

min word length with fulletext search - webmaster forum

 
Webdigity webmaster forums
[ 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
Instabuck - The easy way to sell digital products online

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


It's time to use PHP5!


« on: Oct 03, 2007, 10: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?

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #1 on: Oct 03, 2007, 10: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 or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Oct 04, 2007, 08:30:27 am »

Thanks,

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

Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Oct 04, 2007, 09: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'

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #4 on: Oct 04, 2007, 10: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 or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Oct 04, 2007, 11:00:55 am »


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

no, I use mysql5

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #6 on: Oct 04, 2007, 11:09:27 am »

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 or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


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

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?)

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #8 on: Oct 04, 2007, 11:21:26 am »

No VPS wont be good for that Smiley

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

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Oct 04, 2007, 11:25:35 am »

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

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #10 on: Oct 05, 2007, 11:33:15 am »

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 or twitter

Last blog : Butterfly Marketing 2.0
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....

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?
May 28, 2012, 08:50:40 pm





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!






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