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)

Morgalis 06-06-2004 07:21 AM

i have +8million lines and 165 megs committed to postindex with +500k posts

i've felt searching drags my server so much, would this be a better alternative?

kmike 06-06-2004 07:24 AM

Quote:

Originally Posted by Erwin
Are you sure you copied that line as it is? I just cut and pasted that line EXACTLY AS IT IS POSTED THERE just to test it, and it works on my site.

Erwin: I believe there's an error in your pasted query here:
AGAINST ('$query".$isboolean.")
unmatched single quota. It should be:
AGAINST ('$query' ".$isboolean.")

ImportPassion 06-06-2004 10:57 AM

Erwin,

Yes copied exactly.

I thik there is a single quote missing here
PHP Code:

AGAINST ('$query".$isboolean.") 


Erwin 06-06-2004 11:55 AM

Quote:

Originally Posted by kmike
Erwin: I believe there's an error in your pasted query here:
AGAINST ('$query".$isboolean.")
unmatched single quota. It should be:
AGAINST ('$query' ".$isboolean.")

Nope, that doesn't work on my site.

The code that I've posted works as it is - don't ask me why. You might have to modify it for your site.

ImportPassion 06-06-2004 01:10 PM

yup, i added the single quote and it works no prob, and fast

Showing results 1 to 25 of 342
Search took 0.06 seconds.

it's extremely weird that it works on your site. it's invalid SQL.

kmike 06-06-2004 02:33 PM

It just means there's matching single quote added either at the end of $query variable or at the beginning of $isboolean somewhere.

cerebro 06-06-2004 02:52 PM

Thanks for update!

[high]* cerebro install :D[/high]

cerebro 06-06-2004 04:43 PM

Nice mod...really nice, help a lot. Thanks Erwin for Sharing.

What d u think about stats cache...for optimize forum home.

https://vborg.vbsupport.ru/showthread.php?t=61581

some one install this hack and bollean search?

Erwin 06-10-2004 01:56 PM

Okay, I've made the hack work for "Search Forum" now as well as "Search Thread" - before, "Search individual forums" did not work.

I've also cleaned up the code a lot more. Plus optimized the search query by removing the JOIN function when it is not required (unlike before when you had a JOIN query for every search for no real reason). I also removed relevance and other bits that slowed the search down and increased server load. Straight searching should be faster with this.

Remove my previous codes.

Then, open search.php and replace the line beginning with:

$fulltext_sql =

with this:

PHP Code:

// Erwin's Add-On
 
$searchlimit " WHERE";
$searchforumadd "";
 
if (
$searchthread) {
$searchlimit " WHERE post.threadid=$searchthreadid AND";
}
 
if (
$forumchoice) {
$searchforumadd ", forumid";
$searchlimit " LEFT JOIN thread AS thread ON post.threadid=thread.threadid WHERE forumid IN($forumchoice) AND";
}
 
$fulltext_sql "SELECT postid$searchforumadd FROM post$searchlimit MATCH (".$what_field.") AGAINST ('$query".$isboolean.") LIMIT 0, ".$vboptions['maxresults'];
 
// Erwin's Add-On 

Some people have had problems with this:

('$query".$isboolean.")

It works for me, but some others have had to modify this bit by removing or adding quotation marks - not sure why.

Hope it works for you! It's working well for me - Search Threads and Search Forums are now working well finally! Plus search is optimized even more!

Erwin 06-10-2004 02:07 PM

Note, when I said removed my previous code above that applies only to people who have applied my prevuous Search Thread bug fix.

When I say the query is optimized even more, it's optimized compared to the original fulltext_sql query - it's basically similar to my previous fix, but written slightly different.

Just to clarify. :)


All times are GMT. The time now is 05:26 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.01179 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
  • (2)bbcode_php_printable
  • (2)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