vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Fulltext boolean search v.2.2 for vB (https://vborg.vbsupport.ru/showthread.php?t=62282)

Erwin 05-08-2004 12:16 PM

I'm waiting for kmike's version - why reinvent the wheel? :)

kmike, did you just use the vB2 code? Coz if you did, I can try to modify it to fit too.

ImportPassion 05-08-2004 08:39 PM

Here is some excellent info that everyone should look at.

http://dev.mysql.com/doc/mysql/en/Fu...ne-tuning.html

Erwin 05-08-2004 08:42 PM

My database is fine-tuned already. No matter how much you fine-tune, if your database is big, a LEFT JOIN is a bad query to have.

ImportPassion 05-08-2004 09:46 PM

wasn't meant to be about that. About changing the minimum and maximum word length and other stuff like the stop word list.

Erwin 05-09-2004 05:09 AM

Ahhh... thanks. I see now. :) Interesting... do you have any particular settings that work for you?

kmike, do post your code once you have them ready. :)

JohnWoo 05-09-2004 08:17 AM

If you want to remove left joins together with revelance why not to say just
Code:

$isboolean="'";
if ($vboptions['allowwildcards'] ==1 && preg_match("~[\"\-\*+]~", $query)) {
        $isboolean="' IN BOOLEAN MODE";
}
$fulltext_sql = "SELECT postid FROM ".TABLE_PREFIX."post WHERE MATCH (".$what_field.") AGAINST ('$query".$isboolean.") LIMIT 0, ".$vboptions['maxresults'];

? :)
or in one string
Code:

$fulltext_sql = "SELECT postid FROM
        ".TABLE_PREFIX."post WHERE MATCH
        (".$what_field.") AGAINST
        ('$query'". iif($vboptions['allowwildcards'] ==1 && preg_match("~[\"\-\*+]~", $query), ' IN BOOLEAN MODE', '').")
        LIMIT 0, ".$vboptions['maxresults'];


ScottW23 05-09-2004 08:19 AM

Just wanted to say that we installed this hack on our 950,000 post VB3 board with good results so far. Searches were slow with relevance enabled so I disabled it and searches seem snappy.

ScottW23 05-09-2004 08:22 AM

Quote:

If you want to remove left joins together with revelance why not to say just
Yes why not?! <Slaps JohnWoo> :) Works great, even faster now.

JohnWoo 05-09-2004 09:00 AM

Still want to say few words for left joins :)
Lets say that you have large board with many forums, usergroups and complex access level. After it lets suppose that somebody with common access level (just registered) will search for some common phrase (for example "+javascript +flash").
On one board, where i tested it, such search with no left joins return nothing because fulltext query find first 200 matches in forums invisible to beginner members and stop on it. Showresult page (looking on current member access level) hide all that 200 matches from search result and with great enthusiasm say that nothing found :) On same forum search with left joins return complete set of 200 matches (from other forums visible to beginner members) for same search phrase and may return more if "maxresult" will be set to larger number.
But if your forum access level structure is not too complex, you may remove left join part without visible consequence :)

Erwin 05-09-2004 12:13 PM

Awesome, John Woo. Your new query has fixed my slow_query/ mysql locking/ apache crashing problem (as far as I can tell with testing).

I'm using the first code example, just because the original code is like that. :) Thanks!


All times are GMT. The time now is 10:20 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.01148 seconds
  • Memory Usage 1,735KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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