Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases

Reply
 
Thread Tools
Mysql 4 Search hack Details »»
Mysql 4 Search hack
Version: 1.00, by traekwon traekwon is offline
Developer Last Online: Apr 2006 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-16-2003 Last Update: Never Installs: 18
Is in Beta Stage  
No support by the author.

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:
  • Vbulletin will not require the 'word' or 'searchindex' tables anymore - saving lots of space - instead it will use the 'post' table as an index.
  • Vbulletin will not catalog, reference and index every word of every post upon insertion into the database - saving tons of processing.
  • No need to regenerate the search index ever.
  • The 'post' table will increase in size by about 35%
  • Searches will be considerably faster, and posting will be somewhat faster.
  • Search strings will be able to contain phrases, like "lets share a soda", which can include small words that would of been blocked in vbulletin 2.x searches.
  • Advanced searches, containing included words, optional words, excluded words and exact phrases.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-17-2003, 05:15 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very interesting. What would this do with server loads? Would it increase overall load, or decrease it? I'm impressed.
Reply With Quote
  #3  
Old 04-17-2003, 05:16 AM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks nice, but searching for an exact phrase doesn't seem to work on your site. I tried a couple of very common words and each time it said there were no results.
Reply With Quote
  #4  
Old 04-17-2003, 05:16 AM
nuno's Avatar
nuno nuno is offline
 
Join Date: Oct 2001
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This seems a useful hack, somewhat similar to fastforward's (still unreleased).
Thanks for sharing it.
Reply With Quote
  #5  
Old 04-17-2003, 05:29 AM
nuno's Avatar
nuno nuno is offline
 
Join Date: Oct 2001
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BTW, I'm getting a no permission error at http://www.clockcrew.cc/bbs/search.php.
I'll try this tomorrow. I'm off to bed now.
Good night folks.
Reply With Quote
  #6  
Old 04-17-2003, 06:20 AM
traekwon traekwon is offline
 
Join Date: Mar 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 05:16 AM Tigga said this in Post #3
Looks nice, but searching for an exact phrase doesn't seem to work on your site. I tried a couple of very common words and each time it said there were no results.
try searching for 'break a leg' (no quotes) and put the option 'display results as posts'

Quote:
I'm getting a no permission error
Sorry - i had searching off for guests, it's on now.
Reply With Quote
  #7  
Old 04-17-2003, 06:33 AM
traekwon traekwon is offline
 
Join Date: Mar 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 05:15 AM Erwin said this in Post #2
Very interesting. What would this do with server loads? Would it increase overall load, or decrease it? I'm impressed.
From what i've seen, it's decreased my server load. They are using this hack over at forums.somethingawful.com as well - with ~ 1,800 concurrent users, and a lot of people there have mentioned that the site runs faster but YMMV.

I dont really have an accurate benchmark on which to gauge server performance though, but i've noticed my server load averages have been around 0.9 to 2.0 with an avg. of 80 members online - i remember them being a lot higher before, up in the 5s. I'm pretty sure the performance boost is since the server dosent have to do INSERT and SELECTs for each word in every new post thats added.
Reply With Quote
  #8  
Old 04-17-2003, 06:57 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's with the strange music on your site??!! LOL!
Reply With Quote
  #9  
Old 04-17-2003, 10:36 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks VERY impressing indeed! As a matter of fact one of the most promising hacks that has been released for sometime.

I wish you could make a comparison before and after applying the hack. For instance if you use Teck's microstats hack, it shows searching performance quite good enough. The bottleneck in the default vb searching pushs badly when:
a) you have a big post database.
b) user searches a few common words at the same time. (For instance you have a DVD forum and user searches word "DVD AND MOVIE")
c) User uses wildcard in this search. eg. "dvd* AND movie*"

This search really kills the server in default vb search algorithm even if you are on dedicated. I have experienced searching taking upto 10-15 seconds in such searches in some large boards and when they have a few of such searches, the server gets on to its knees.

It would be terrific to learn the stats for such searches before and after you applied the hack. I really wonder how much it enhances the server load issue.

Quote:
The 'post' table will increase in size by about 35%
This is nothing to worry about! Tables "search" and "searchindex" has always larger than table "post" so when you get rid of them altogether, you'll still save 65% more space in the server even if you have 35% loss in post table.

Since these 3 tables are the largest tables in your database, %65 more space for them means more than %50 gain in your MYSQL space (thus server space) which is incredible!
Reply With Quote
  #10  
Old 04-17-2003, 07:12 PM
Paul Paul is offline
 
Join Date: Jan 2002
Posts: 211
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What would happen in a vb2 to vb3 upgrade once this hack is installed?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:55 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11356 seconds
  • Memory Usage 2,300KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete