Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

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
  #82  
Old 06-19-2003, 09:47 PM
Dontom Dontom is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For those who wish to change their preset minimum word-length:
(Standard is 4 characters)
you have to set a var in your my.cnf:
set-variable = ft_min_word_len=3


More info: http://www.mysql.com/doc/en/Fulltext_Fine-tuning.html

Thanks for this great hack! Search is faster than before, so ist posting , too.
The most notably difference: Editing has a huge difference now - this caused always peaks and took very long - now its instant
(My Forums: >600.000 Posts > 12.000 Users)
Database size went from 2 GB to 1,6 GB

Tom
Reply With Quote
  #83  
Old 06-20-2003, 02:13 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working well with my private forums with over 1 million posts. Working so well, that this is one reason why I may not upgrade to vB3.
Reply With Quote
  #84  
Old 06-20-2003, 11:47 AM
David Bott David Bott is offline
 
Join Date: Dec 2001
Posts: 215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi All...

Again I feel I must ask. Have your removed the limit statements from the code? It will be faster then the standard code just with the limit statements in it. You can just ad the same statements to the current code and you will have the same affect.

Thus I still looking to see if it is faster without them. At this point the only thing I see is the removel of the larger indexes.

Don't get me wrong, getting rid of the LARGE indexes is a good thing....I am all for it. But I still am not sure about the benefit at this point. Not to mention.,..if you go to ver 3, then the hack may not work and their may or may not be an up date to it. Then you need to rebuild the indexes again and that is something that takes out site over a day and a half to do with 2 million+ posts.

I am sorry, but I am just looking for some good remark on it. I really want to try this hack, but I have yet to see anything that jumps out and says this is a btter way other then the dumping of the large indexes.

Thank you kindly.

http://www.avsforum.com For thouse who do not know me.

Threads: 261,927 Posts: 2,287,189 Registered Members: 71,568

David
Reply With Quote
  #85  
Old 06-20-2003, 12:38 PM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I don't think this works

I went to
http://www.clockcrew.cc/bbs/showthre...threadid=15485

I took the phrase
"evil clocks in my movie" from that thread

I went to search for exact phrase and nothing comes up. I even tried just "evil clocks" and nothing came up.

What gives?

D
Reply With Quote
  #86  
Old 06-20-2003, 02:50 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 07:13 AM Erwin said this in Post #82
Working well with my private forums with over 1 million posts. Working so well, that this is one reason why I may not upgrade to vB3.

You just followed the instructions? Nothing worked for me. Can you translate the readme file into English (from gibberish)? So people could use this great hack. And why do you think you could not integrate it in vb3?
Reply With Quote
  #87  
Old 06-20-2003, 03:15 PM
Dontom Dontom is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Instructions seemed very clear to me - where Do you have problems?
Tom
Reply With Quote
  #88  
Old 06-21-2003, 01:51 AM
sajjid sajjid is offline
 
Join Date: Jul 2002
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can someoen please verify theses instructions for or is that a mistake here what is says

**Search for the string "DELETE FROM searchindex" - around line 827
**and change this line:

$DB_site->query("DELETE FROM searchindex WHERE postid=$getfirstpost[postid]");

**to:

//$DB_site->query("DELETE FROM searchindex WHERE postid=$getfirstpost[postid]");

the last line which starts with // is that correct ? or should it start with $
Reply With Quote
  #89  
Old 06-21-2003, 02:18 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 09:51 PM sajjid said this in Post #87
can someoen please verify theses instructions for or is that a mistake here what is says

**Search for the string "DELETE FROM searchindex" - around line 827
**and change this line:

$DB_site->query("DELETE FROM searchindex WHERE postid=$getfirstpost[postid]");

**to:

//$DB_site->query("DELETE FROM searchindex WHERE postid=$getfirstpost[postid]");

the last line which starts with // is that correct ? or should it start with $
It means to comment that line out with the //
Reply With Quote
  #90  
Old 06-24-2003, 11:06 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
06-20-03 at 08:15 PM Dontom said this in Post #86
Instructions seemed very clear to me - where Do you have problems?
Tom
Like to transform the DB tables?
Really, I sat down and looked at it several ways, but did not find a way to make all the indexes and all the things. Can anybody, I beg you, write the steps, concerning the Db changes in clear, step by step English?
Reply With Quote
  #91  
Old 06-24-2003, 12:36 PM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, well first question.
Do you know what phpmyadmin is and do you have it?

If yes to both, then the instructions are pretty damn clear

2. in phpMyAdmin, select your vbulletin database, and locate the 'post' table.
the drop down on the left contains ur databases, select the one that contains the vb tables. then scroll down the right side to u see the 'Post' table and select 'Properties'.

3. skipped

4. click on the 'change' link in the 'pagetext' row to edit the datatype.
in the 'Field' column, find 'pagetext'. Under the 'Action' column for this field, click 'Change'

5. change the type of the 'pagetext' column from 'mediumtext' to 'text', and click 'save' - be patient this might take a while.
on this page under the 'Type' column it will say 'mediumtext' change that dropdown to 'text' then click 'save'. it will take time depending on how many posts you have

6. click on 'fulltext' in the 'pagetext' row to create a fulltext index of 'pagetext' - this might take a very long while.
i think that will bring you back to the page from step 2, if not, follow step 2 again. in the 'Field' column, find 'pagetext'. Under the 'Action' column for this field, click 'Fulltext'

7. click on 'fulltext' in the 'title' row to create a fulltext index of 'title'
i think that will bring you back to the page from step 2, if not, follow step 2 again. in the 'Field' column, find 'title'. Under the 'Action' column for this field, click 'Fulltext'

8. once the operation has completed, click on the 'operations' tab and optimize the table. - this might take a while.
at the top you will see a blue tab called 'operations', click it and then click 'Optimize table' at the bottom under 'Table maintenance'

that's it.
if you don't understand this, then you shouldn't be doing this hack. my 2cents.

D
Reply With Quote
Reply


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 05:14 PM.


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.04783 seconds
  • Memory Usage 2,318KB
  • Queries Executed 27 (?)
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
  • (3)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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