Not Solved Minimum search length - changing?
#1
Not Solved Question 
Hey there,
I know that the minimum length of searched word is 3 letters. I tried changing it in the administration panel, but the only thing it affects is minimum number of words that system can search for.
One person wrote that:

Quote:Bear in mind though at MySQL fulltext search is limited to a minimum of 3 characters too (I believe that's why we set it to 3), so it might not actually have an effect if changed to 1 or 2.
How can I change this thing to actually look for words such short as "me" or "I". I am sure there is way to do it..

Thanks in advance
Reply
#2
Not Solved
This could potentially kill searching on your forum. What may happen is users will search for the letter "I" and the database has to go through thousands and thousands of posts. By then, your MySQL server may have timed out and not forgetting searching for a letter like "I", most posts on your board will come up in the search results. If your database uses Innodb it's likely that the default search requirement is 3 letters, if it's MyISAM it'll be 4.

If you're still wanting to do this, once you've changed the default value in MyBB see here.
Plugin Count: I lost count.
Public Plugins are available here.
Official GitHub.
Please do not PM me for support unless asked to.
Reply
#3
Not Solved
Thank you Wires!

I really appreciate your post and your attempt to help me.
I went though the link you provided me with but I believe my computing skills are not high enough to understand it..
As I read it I understand I should do some changes in the database, but it seems fairly complicated.I have an access to my database, my posts etc., but is there a way that somebody can explain it to me in a bit more friendly way? At this point I literally got no room to go.


The link mentions some specific types of indexes - FULLTEXT . What are they?

The minimum and maximum lengths of words to be indexed are defined by the innodb_ft_min_token_size and innodb_ft_max_token_size for InnoDB search indexes, and ft_min_word_len and ft_max_word_len for MyISAM ones.
Where exactly are those database names? I dont see them, I only see something like:
my_adminlog
my_adminoptions
my_adminsessions
etc.

Any help would be very appreciated!
Reply
#4
Not Solved
The guide refers to lines in your MySQL Configuration file (my.cnf). I should of mentioned earlier that if you're on shared hosting you may have to talk to your hosting provider about doing this for you. If you have your own server, you can go ahead and edit your /etc/my.cnf or /etc/mysql/my.cnf file and add the following lines under [mysqld] section:

innodb_ft_min_token_size=2
ft_min_word_len=2

Now would be a great time to back-up your database data and structure. You will then need to follow the rest of the guide to restart MySQL and rebuild the full-text indexes.
Plugin Count: I lost count.
Public Plugins are available here.
Official GitHub.
Please do not PM me for support unless asked to.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)