The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Mysql 4 Search hack Details »» | |||||||||||||||||||||||||
MySQL 4 Search hack for Vbulletin 2.x.x - version 1.2 beta
Author: PineappleClock (pineappleclock@clockcrew.cc) aim: Janitor61 ------------------------------------- Overview The MySQL 4 search hack modifies the search functionality in Vbulletin to take advantage of the new SQL functions available in MySQL 4. Synopsis This hack allows MySQL to index the posts and threads in your BBS instead of requiring vbulletin to do it. This hack, when installed, will change the BBS in the following ways:
File Listing install.txt -- the installation howto simplesearch.txt -- a block of code that replaces a block of code in search.php searchtemplate.txt -- a vbulletin template used for drawing the search form. Requirements MySQL 4.0.1 or newer - required vbulletin 2.x.x - required (i've only tested it on 2.3.0 though) How to check your MySQL version: execute the following query: Code:
SELECT @@global.version Notes The installation instructions assumes that you have access to database management software, like phpMyAdmin. If you can't edit your database directly, I can make a php script that will modify your database if there's enough demand. The Vbulletin team aren't going to put in support for MySQL 4 until version 3.1 - so this hack should be obsolete by then. If you'd like to see the modified search engine, go here: http://www.clockcrew.cc/bbs/search.php I was originally going to distribute the whole modified search.php file, but after reading the rules, im only distributing the modified part. Please let me know if you spot any bugs, etc. I've tested this, but there still are probably bugs i need to work out. update [Apr 17]: added instructions on uninstalling good luck! Show Your Support
|
Comments |
#22
|
||||
|
||||
Seems to work great! (currently running it on a testforum)
One small side note: In the install.txt instruction, you mention once OPEN FILE: /functions.php and once OPEN FILE: /admin/functions.php. Well, there is no /functions.php and I think the instruction is duplicated there (so skip the /functions.php part). |
#23
|
||||
|
||||
Another Q:
Should I still keep Minimum Word Length (default 4)? I noticed that when using the new search hack any word <minimum word length would result in a "Sorry - no matches. Please try some different terms." but not in the "The search term you specified (fin) is under the minimum word length...." text. What about the other Search options in admincp? Do they still have any functionality? Namely: Floodcheck - Minimum time between searches Minimum Word Length Maximum Word Length Allow Wild Cards? Greets Alex |
#24
|
||||
|
||||
Excellent hack! Reading through the fulltext searching page in the mysql manual, i stumbled accross Patrick O'Lone's reply:
Quote:
|
#25
|
||||
|
||||
I am curious to know if anyone has already run a little benchmark test on this one.
Unfortunately, my forum is too small for the hack to make any noticeable difference. |
#26
|
|||
|
|||
I don't have any hard numbers to prove it but going by feel I think it has made a really big difference. I have recieved numerous user comments about how much faster search seems.
My load averages are way down but I am not sure how much of that is Mysql 4 and how much is the search. |
#27
|
|||
|
|||
Well, this was a happy coincidence.
I had just done some maintenance and needed to rebuild my search index. I have about 100,000 threads in my forum so it was taking forever. About halfway through I decided to look for a better way to go about it, hoping there was a script or something. Rebuilding the search index is a real pain for a large vb forum. I came across this hack and it encouraged me to upgrade to mysql 4 and give it a shot. The upgrade to v4 was a cinch, and the hack installed in a straightforward way. It took about an hour and a half to run the SQL commands. This is the most involved hack I've installed. I run several of my own private hacks but tend to avoid other people's hacks. This one is a winner. I have between 500 and 700 people online during the day. My servers are seeing decreased load. Unfortunately I didn't capture any statistics beforehand, but from memory I believe my database load is about 2/3rds of what it was. This is significant in my situation as I'm always running out of hardware and vb doesn't scale well beyond 2 servers. My forums are at: http://www.rcgroups.com (the busy forums are in the "electric" section) Jim |
#28
|
|||
|
|||
Well, I'm loving this hack too.
My load is considerably lower on the webserver thats not running my DB, and on the DB server its more or less the same despite my queries per second being about 30% higher (due to increased site traffic). Seems as though people are surfing more, maybe because the search doesn't suck anymore? I was posting over at vb.com in the forums trying to help convince them that they need to support a fulltext search option. Obviously it would require another search.php, because they are still supporting mysql 3.x, but they are all "the performance increase and db size decrease are negligible".. I'm not saying that the fulltext search is THAT fantastic, but I can safely say that I don't think I'll be upgrading to vb3 when it comes out until someone has hacked together a fulltext search like this. One thing I have noticed though is that some people are complaining that some searches are returning no results. When I asked them what they were searching for, they replied that they were searching for phrases like "dye" and "ir3". Now these are pretty commonly searched for terms in the paintball world, and it would be cool if this would work, despite them being short and sort of common words.. Is this new search engine still sensitive to short search phrases? Am I making any sense? |
#29
|
||||
|
||||
Quote:
|
#30
|
|||
|
|||
Yeah, my board has ~1.5 million posts, its unlikely that those phrases are occuring in > 1/2 the posts..
|
#31
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|