Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles

Reply
 
Thread Tools
Howto : Enable FullText Searching in vBulletin 3.0.2/3
Zachery's Avatar
Zachery
Join Date: Jul 2002
Posts: 11,440

 

Ontario, Canada
Show Printable Version Email this Page Subscription
Zachery Zachery is offline 07-01-2004, 10:00 PM

This feature is not offcialy supported at this time, so enabling this is like hacking your forums

You'll need to shut your boards down for security reasons and enter debug mode, or enable debug mode for yourself only.

Once done, go into the vBulletin AdminCP > and select vBulletin Options.

You will see an area called Version Info and Other Untouchables
At the bottom you will see

Fulltext Search

Run the two querys it says to, adjust for table prefixes.

Then click on yes and hit save.

This feature is not offcialy supported at this time, so enabling this is like hacking your forums
Reply With Quote
  #32  
Old 07-03-2004, 07:39 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gorman
Activated it. So far not a single problem. Let's cross fingers. Should it improve performance, apart from saving some space?
Yes. For big sites with lots of posts the normal search function is unusable as it requires way too much RAM.
On my board for example (postindex = 25 million rows) I get memory limit exceeded errors from PHP with specific keywords, even if I increase the limit > 64 MB.
So it is impossible to search for those keywords

With mySQL fulltext search this shouldn't be a problem any longer.
Reply With Quote
  #33  
Old 07-04-2004, 05:23 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The vB 3.0.2 mysql fulltext search is still not as efficient as the vB3 hack version (with my own customizations to the code). I tried the 3.0.2 version, and with over 8 million posts, it still brought the server down. With the other hack version, my server has not problems. Just making an observation.
Reply With Quote
  #34  
Old 07-04-2004, 05:28 AM
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
Posts: 506
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
The vB 3.0.2 mysql fulltext search is still not as efficient as the vB3 hack version (with my own customizations to the code). I tried the 3.0.2 version, and with over 8 million posts, it still brought the server down. With the other hack version, my server has not problems. Just making an observation.
and what pray tell is that? Something that offers no options?
Reply With Quote
  #35  
Old 07-05-2004, 01:37 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Freddie Bingham
and what pray tell is that? Something that offers no options?
Well, I tried the default vB3 fulltext search, and it scanned almost 1,000,000 rows for the word "test" for over 300 seconds before it borked. Never managed to complete it.

With the custom code, the word "test" took 19 seconds (which is not fast by any means but it's a big database) - and scanned 100 rows (which is a limit I imposed, but which I can increase). This is just using the normal search page, with all settings default, searching all forums.

It's not a fault to do with vB3 at all - fulltext has its own limitations too.

The day that InnoDB supports fulltext, is the day the post table goes InnoDB, to prevent table locking.
Reply With Quote
  #36  
Old 07-05-2004, 02:00 AM
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
Posts: 506
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
Well, I tried the default vB3 fulltext search, and it scanned almost 1,000,000 rows for the word "test" for over 300 seconds before it borked. Never managed to complete it.

With the custom code, the word "test" took 19 seconds (which is not fast by any means but it's a big database) - and scanned 100 rows (which is a limit I imposed, but which I can increase). This is just using the normal search page, with all settings default, searching all forums.

It's not a fault to do with vB3 at all - fulltext has its own limitations too.

The day that InnoDB supports fulltext, is the day the post table goes InnoDB, to prevent table locking.
Well that is the reason then, we are not imposing a limit on the results as of yet. We are going to look at doing that coming up.
Reply With Quote
  #37  
Old 07-05-2004, 03:27 PM
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
Posts: 506
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Freddie Bingham
Well that is the reason then, we are not imposing a limit on the results as of yet. We are going to look at doing that coming up.
Here is one optimization. As I have time to work on this for 3.1, I'll try to post changes for you.

With 3.0.2 or 3.0.3 you should edit search.php and look for this around line 1303:

FROM " . TABLE_PREFIX . "post AS post

Change this to:

FROM " . TABLE_PREFIX . "post AS post " . iif($vboptions['fulltextsearch'] AND $searchuser, "USE INDEX (userid)") . "

When searching by posts by a specific user and returning results as posts, this will force mysql to search based on userid rather than using the fulltext index. On the whole this will be faster than searching fulltext and then manually scanning for userids.

I'm just getting into imposing the proper limit options and re-evaluating the relevancy junk for the non-fulltext search. It is the extra queries that we have in place to support this pseudo-relevancy that complicates limiting searches when returning results as threads.
Reply With Quote
  #38  
Old 07-05-2004, 03:38 PM
gorman gorman is offline
 
Join Date: Sep 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Freddy, I have activated the full text search but, apparently, it's making things worse, performance wise, for us, with huge load spikes that I am tracing back to the search function, as deactivating it has instantly eliminated them.

Could this be possible? Forum address is forum.gamesradar.it
Reply With Quote
  #39  
Old 07-05-2004, 08:03 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I followed Zach's instructions to the letter, however I'm finding that there are many words that are coming up with empty results.


For example, if I search for the word "from", I get no matches. I emptied out most of the "bad words" in searchwords.php, but that didn't do anything.


At the moment, Full Text Searching is missing the ball on quite a bit. Is there something else I need to do after enabling it? Some type of update or refresh to MySQL, perhaps?
Reply With Quote
  #40  
Old 07-05-2004, 08:14 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As an additional note on my problem, most of the words I'm having problems with are either words less than four characters in length, or common words.


Now, my AdminCP has Minimum Word Length set to 3, and I've emptied most the stuff in searchwords.php.

Does the Full Text Search have a different set of options for it than the Regular Search?

If so, where are they, and what do I need to do in order to edit them?
Reply With Quote
  #41  
Old 07-05-2004, 08:36 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ocean
As an additional note on my problem, most of the words I'm having problems with are either words less than four characters in length, or common words.


Now, my AdminCP has Minimum Word Length set to 3, and I've emptied most the stuff in searchwords.php.

Does the Full Text Search have a different set of options for it than the Regular Search?

If so, where are they, and what do I need to do in order to edit them?
Full Text search goes on MySQL's settings i believe, they have a list of common words and the mininum chracter limit is 4 i believe
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:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04840 seconds
  • Memory Usage 2,302KB
  • 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
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)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_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