Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #431  
Old 11-05-2007, 11:39 PM
BrandiDup's Avatar
BrandiDup BrandiDup is offline
 
Join Date: Jun 2005
Location: San Diego, CA
Posts: 213
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by weeno View Post
http://forums.macrumors.com/search.php

Sphinx search with two different search options (match documentation)

Normal = Match All (SPH_MATCH_ALL mode)
Extended = Extended (SPH_MATCH_EXTENDED mode)

both use sphinx.

arn
OK, I'm thoroughly confused now. It looks JUST LIKE vBulletin search. So, the sphinx search is integrated into the actual forums, it's not at all like the google search that you get for your site that brings the search up in a totally different format, right? The search is kind of slow on our site but I tried the google and didn't like it b/c of the format that the results get brought back in. How exactly (in dummy terms) is it different from the search engine built into vbulletin? It looks so much like the standard search, which is very nice, but confusing to me...
Reply With Quote
  #432  
Old 11-05-2007, 11:43 PM
weeno weeno is offline
 
Join Date: Jan 2002
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BrandiDup View Post
How exactly (in dummy terms) is it different from the search engine built into vbulletin? It looks so much like the standard search, which is very nice, but confusing to me...
When you initiate a search with normal vBulletin code, it performs a complicated MySQL query to your database. This can be so complicated that it slows down your database and make it unresponsive.

What Sphinx does is run an indexer, which pulls the data from the database and indexes it in a file on the hard drive. So when you search, you access these files. It doesn't tie up the database and is much faster and less resource intensive. The catch is you need to keep updating the files on a regular basis (usually with an automted script running ever 20 minutes or so).

So, from vbulletin's side, you need to modify vb's search.php file, so instead of asking MySQL for search results, it asks Sphinx. The results are then sent back to VB and displayed just like you are used to.

arn
Reply With Quote
  #433  
Old 11-06-2007, 01:28 AM
BrandiDup's Avatar
BrandiDup BrandiDup is offline
 
Join Date: Jun 2005
Location: San Diego, CA
Posts: 213
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by weeno View Post
When you initiate a search with normal vBulletin code, it performs a complicated MySQL query to your database. This can be so complicated that it slows down your database and make it unresponsive.

What Sphinx does is run an indexer, which pulls the data from the database and indexes it in a file on the hard drive. So when you search, you access these files. It doesn't tie up the database and is much faster and less resource intensive. The catch is you need to keep updating the files on a regular basis (usually with an automted script running ever 20 minutes or so).

So, from vbulletin's side, you need to modify vb's search.php file, so instead of asking MySQL for search results, it asks Sphinx. The results are then sent back to VB and displayed just like you are used to.

arn
OK, that makes sense then. How cool that it integrates so nicely, to be exactly like what the users are used to. My members aren't at all keen on the google search b/c of the way the results display but I think we'll need a better solution than the standard vb search soon. So, this may be worth looking in to.

I did try to skim through most of this very long thread but the original post is gone and some of the thread is sort of confusing to me. So, can you or anyone else tell me if this is a good, stable solution that would be fairly easy for implement?

For the updating that needs to be done every 20 minutes or so, is that done by cron through vbulletin? Or do you enable it somewhere else? And, lastly, does this updating bog the server down? Every 20 minutes seems like a lot of updating but I guess it wouldn't matter if it's not that server intensive.

I'm just trying to figure out a solution that will work for us as we grow.


While we're on this subject though, is the new posts search function as server intensive as normal searches are? Nearly everyone who uses our site uses the new posts feature, so we've got no less than 100 people clicking new posts at the same time, over and over and over again. I was just wondering if this is the same as normal search or if this is something entirely different.

Thank you so much for your help.
Reply With Quote
  #434  
Old 11-06-2007, 02:27 AM
weeno weeno is offline
 
Join Date: Jan 2002
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BrandiDup View Post
I did try to skim through most of this very long thread but the original post is gone and some of the thread is sort of confusing to me. So, can you or anyone else tell me if this is a good, stable solution that would be fairly easy for implement?

For the updating that needs to be done every 20 minutes or so, is that done by cron through vbulletin? Or do you enable it somewhere else? And, lastly, does this updating bog the server down? Every 20 minutes seems like a lot of updating but I guess it wouldn't matter if it's not that server intensive.

I'm just trying to figure out a solution that will work for us as we grow.

While we're on this subject though, is the new posts search function as server intensive as normal searches are? Nearly everyone who uses our site uses the new posts feature, so we've got no less than 100 people clicking new posts at the same time, over and over and over again. I was just wondering if this is the same as normal search or if this is something entirely different.

Thank you so much for your help.
It's not that easy a solution to implement. you have to know your way around the linux/unix command line a bit to get the solution working.

Sphinx itself needs to compiled/installed. the config file need to be modified. cron jobs added etc... all doable, but not entirely straightforward esp if you have limited experience with it. myself included, it took me a while to stumble through it myself. All the information is best summarized in these posts:

https://vborg.vbsupport.ru/showpost....&postcount=387
https://vborg.vbsupport.ru/showpost....&postcount=445
https://vborg.vbsupport.ru/showpost....&postcount=450

It does appear to be a stable solution and works very well as you can see.

The New Posts search does not appear as intensive and mine is still running through my regular mysql search and doing fine.

arn
Reply With Quote
  #435  
Old 11-06-2007, 05:57 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BrandiDup View Post
Does anyone have a forum where I can see this type of search in action?
Yesterday Jason very kindly helped me to get Sphinx going on my forums with over 5 million posts at www.avforums.com/forums/search.php
Basically turned a struggling site into a quick one. :up:
Reply With Quote
  #436  
Old 11-07-2007, 07:52 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just deleted the fulltext indexes from post and thread and got the following error when undeleting a thread:
Quote:
Database error in vBulletin 3.6.8:

Invalid SQL:

SELECT thread.threadid, MATCH(thread.title) AGAINST ('Premium Pack ?190') AS score
FROM thread AS thread

WHERE MATCH(thread.title) AGAINST ('Premium Pack ?190')
AND thread.open <> 10
AND thread.threadid <> 528589

LIMIT 5;

MySQL Error : Can't find FULLTEXT index matching the column list
Error Number : 1191
Date : Wednesday, November 7th 2007 @ 09:50:56 AM
Script : http://www.avforums.com/forums/posti...hread&t=528589
Referrer : http://www.avforums.com/forums/posti...hread&t=528589
IP Address : 82.37.224.75
Username : Stuart Wright
Classname : vB_Database
HELP!

(I recreated the index for now)
Reply With Quote
  #437  
Old 11-07-2007, 08:24 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Most likely something to do with Similar Threads. You can try disabling this in your vBulletin Options.
Reply With Quote
  #438  
Old 11-07-2007, 08:50 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If it is similar threads and I want to keep the functionality, is there a work around?
Reply With Quote
  #439  
Old 11-07-2007, 08:57 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then you shold not remove the index.
Reply With Quote
  #440  
Old 11-07-2007, 03:24 PM
weeno weeno is offline
 
Join Date: Jan 2002
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden View Post
Then you shold not remove the index.
I suppose this answers a question I had about similar threads. I guess similar threads uses full text search. Anyone interested in hacking it to use sphix?

arn
Reply With Quote
Reply


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 06:58 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09995 seconds
  • Memory Usage 2,291KB
  • Queries Executed 12 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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