vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Howto : Enable FullText Searching in vBulletin 3.0.2/3 (https://vborg.vbsupport.ru/showthread.php?t=66789)

Ocean 07-05-2004 08:39 PM

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...) :)

Ocean 07-05-2004 09:20 PM

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!

ConqSoft 07-05-2004 10:56 PM

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?

Erwin 07-06-2004 02:43 AM

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.

Ocean 07-06-2004 03:17 AM

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... :)

gorman 07-06-2004 01:41 PM

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?

ConqSoft 07-06-2004 01:43 PM

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.

CaptChill 07-06-2004 03:18 PM

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';

Ocean 07-06-2004 07:23 PM

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. :)

Zachery 07-06-2004 07:24 PM

Im confused....


All times are GMT. The time now is 05:49 AM.

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.01219 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete