Searching for 3 letter words or phrases is enabled!

The latest forum news and information
Post Reply
User avatar
WelchTC
Senior Member
Posts: 2085
Joined: Wed Sep 06, 2006 8:51 am
Location: Kaysville, UT, USA
Contact:

Searching for 3 letter words or phrases is enabled!

#1

Post by WelchTC »

We have modified the forum searching so that you can now search for three letter words or phrases. Before you were limited to 4 letter words or phrases. This will make it easier for you to search for items like "PHP", "XML", "RSS", "MLS", etc.

For those who want to read the technology details behind this...here they are.

To modify the limitation, it required four steps.

Step #1: By default MySQL (which is the DB we run on with the forums) limits full text searching to only 4 characters. I needed to add "ft_min_word_len = 3" to the "my.cnf" file and the restart the MySQL server. This tells the MySQL fulltext indexing system that it should index all 3 letter combinations. It does not, however, rebuild any of the indexes.

Step #2: Next we had to rebuild all of the index files in the database. Basically it required us to execute the "repair table xxxx" SQL statement for each table in the database that has a fulltext search field. You can do multiple tables at a time by issuing the "repair table xxxx1, xxx2, xxxx3" statement.

Step #3: Now that the DB is all ready, we need to tell vBulletin that we can support 3 character searches. This was a setting in the vBulletin "Message Searching" options administrators control panel.

Step #4: Finally we need to rebuild the vBulletin searching cache indexes. This is a simple tool inside of the vBulletin administrators panel.

Tom
User avatar
thedqs
Community Moderators
Posts: 1042
Joined: Wed Jan 24, 2007 8:53 am
Location: Redmond, WA
Contact:

#2

Post by thedqs »

So how long did that take?
- David
User avatar
WelchTC
Senior Member
Posts: 2085
Joined: Wed Sep 06, 2006 8:51 am
Location: Kaysville, UT, USA
Contact:

#3

Post by WelchTC »

thedqs wrote:So how long did that take?
The hard part was getting down the right sequence. Once that was done it took me about 15-20 minutes of which the forum was off line less than a minute (we have a fast server).

Figuring out the proper sequence and testing it took me about 2 hours.

Tom
Post Reply

Return to “Announcements & Policies”