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
  #42  
Old 07-05-2004, 08:39 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery

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

Well, I need to bypass/change these settings. What do I need to do in order to accomplish that?


(Thanks, by the way...)
Reply With Quote
  #43  
Old 07-05-2004, 09:20 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Aha! Okay, I figured out how to change/bypass the MySQL settings for Minimum Word Length and the Stopword lists.


If anyone else is interested, here's what you have to do:

NOTE: The following instructions are applicable for MySQL 4.0.18. I believe they are valid for 4.0.3 and above.



1. In your MySQL option file ("C:\Windows\My.ini", for example), under the central group category ( "[mysqld]", for example), add the following two items:


Code:
 
ft_min_word_len=2
ft_stopword_file=""

The first item sets the minimum word length to be indexed. In my example, I have it set to 2 characters.

The second item bypasses the MySQL Stopword list - which covers common words like "from", "and", etc...


Alternately, you can always edit the Stopword file directly. To do this, you need to find out what the default file/location is for your particular install (based on version, Platform, how it was installed, etc...)

Use and/or edit either of these two options to suit your needs.


2. After you have made the above changes, restart MySQL. (or, alternately, the entire server).

3. From your AdminCP, execute the following Queries:

REPAIR TABLE post QUICK
REPAIR TABLE thread QUICK


If you use Table Prefixes, edit "post" and "thread" accordingly.



After that, you should be done!
Reply With Quote
  #44  
Old 07-05-2004, 10:56 PM
ConqSoft's Avatar
ConqSoft ConqSoft is offline
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 686
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did this, and cleared the search index, but it's still showing:

Index Usage 50.31 MB

in the AdminCP stats. Should that be zero?
Reply With Quote
  #45  
Old 07-06-2004, 02:43 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
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.
FWIW, I've found removing the relevance checks speeds up the search, and the quality of the search is not really affected.

Also, like you say, it's really the returning the results as threads that's the site killer for large forums even with optimization and fulltext. Returning results as posts is not an issue with the right search code.
Reply With Quote
  #46  
Old 07-06-2004, 03:17 AM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ConqSoft

I did this, and cleared the search index, but it's still showing:

Index Usage 50.31 MB

in the AdminCP stats. Should that be zero?
I'll give you my best guess, which is that it should NOT be zero. When you enable FullText Searching, the two queries that you run create indexes within your "posts" and "threads" tables. Although these are fulltext type indexes, I would think that by virtue of being part of your database, they will still show up as part of your Index useage.

One of the Devs might be able to chime in to say whether I'm way off the mark or not...
Reply With Quote
  #47  
Old 07-06-2004, 01:41 PM
gorman gorman is offline
 
Join Date: Sep 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
Also, like you say, it's really the returning the results as threads that's the site killer for large forums even with optimization and fulltext. Returning results as posts is not an issue with the right search code.
hmmm... as a temporary solution, do you think it will improve performance to forbid searching for threads and limiting the search options to posts?
Reply With Quote
  #48  
Old 07-06-2004, 01:43 PM
ConqSoft's Avatar
ConqSoft ConqSoft is offline
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 686
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With Full Text on, go to a thread (any thread), use the Search This Thread option and search for something that appears in the current thread.

When I did this, I also got results from other threads.
Reply With Quote
  #49  
Old 07-06-2004, 03:18 PM
CaptChill CaptChill is offline
 
Join Date: Nov 2003
Location: Daytona Beach
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which PHP form do I look for Zach?

Q7. How to I turn on debug mode?

A7. Find

PHP Code:
// Prefix that all vBulletin cookies will have
// For example
$cookieprefix = 'bb';

add under

PHP Code:
// Enable / Disable Debug mode
// 1 on. 0 off.
$debug = '1';
Reply With Quote
  #50  
Old 07-06-2004, 07:23 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CaptChill
Which PHP form do I look for Zach?


Q7. How to I turn on debug mode?

A7. Find

PHP Code:
// Prefix that all vBulletin cookies will have
// For example
$cookieprefix = 'bb';


add under

PHP Code:
// Enable / Disable Debug mode
// 1 on. 0 off.
$debug = '1';

It's true that that very important piece of information is missing from the post in question.

But to answer it for you, it's includes/config.php.
Reply With Quote
  #51  
Old 07-06-2004, 07:24 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im confused....
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:06 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.04697 seconds
  • Memory Usage 2,304KB
  • 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
  • (5)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