PDA

View Full Version : Search for 3 characters


paradoxG(r)eek
02-24-2017, 02:53 PM
Hello,

I know that MySQL has a 4 characters limitation for minimum string lenght (ft_min_word_len) and if I want to change it to 3 characters, I must edit my.cnf file and set:

[mysqld]
ft_min_word_len=3

and then rebuild FULLTEXT indexes.

My question is if vBulletin has somewhere a function to check the words lenght before perform the query, which returns the error message:

The following words are either very common, too long, or too short and were not included in your search:


I'm also wondering why this limitation exists for normal (VARCHAR) fields like Title and Username. I believe that these fields are having normal and not FULLTEXT indexes.

Any help will be appreciated. Actually what I want is which vB file to edit to change this text limitation from 4 to 3 characters.

Thank you
Christos

Lynne
02-24-2017, 03:39 PM
Yes, vbulletin has a list of words that it considers common. It is in /includes/searchwords.php

paradoxG(r)eek
02-24-2017, 04:35 PM
Yes, vbulletin has a list of words that it considers common. It is in /includes/searchwords.php

Thank you for your prompt attention Lynne. Really appreciated. The most important for me is to find (if exists) where is locating the strlen restriction to change it from 4 to 3.

Seven Skins
02-25-2017, 11:54 AM
AdminCP > Message Searching Options > Search Index Minimum Word Length = set it to 3

Lynne
02-25-2017, 03:47 PM
Thank you for your prompt attention Lynne. Really appreciated. The most important for me is to find (if exists) where is locating the strlen restriction to change it from 4 to 3.
Do you mean you don't know where the my.cnf file is? If so, you would need to ask your host where it is because it is in different places on different servers.

paradoxG(r)eek
02-25-2017, 04:24 PM
Do you mean you don't know where the my.cnf file is? If so, you would need to ask your host where it is because it is in different places on different servers.

No, maybe I was not clear. Sorry for my English. I want to know where vBulletin has the "less than 4 characters" validation (if it has such validation).

The error message appears to be from a vB validation before sending the query to mysql. Maybe I'm wrong but this is what I understood.

Edited: Ok, as Seven Skins wrote, I found it but, as I seen, it works only for full words and not for using wildcards to find the letters inside the word.