Go Back   vb.org Archive > Community Discussions > Forum and Server Management
  #541  
Old 05-03-2008, 07:33 AM
scanlover scanlover is offline
 
Join Date: May 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I managed to integrate sphinx 0.9.8 rc2 with my vbulletin board 3.70 quite easily thanks to this thread.

I followed the instructions here:

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

However the attached config file there was deprecated, I've updated it and attached my version below. I note that in vbulletin, the dateline and lastpost fields are stored as int(10) and not as a timestamp, hence I changed the config file to mark them as "sql_attr_uint" instead.

Also, as my board and database is running totally on utf-8 with some posts in CJK, so I have enabled CJK support in the attached config file as well, hope it is of use to someone

The sphinx.php files I found here seem to be partially buggy. ($coventry? empty arrays?) Will appreciate if someone can post a updated working version, especially for vB 3.7 ?

Lastly, I have converted my thread and post tables to INNODB, since there is now no need for the MYISAM FULLTEXT indices. Hopefully this will alleviate the table locking problems (no stats to show for though). Not sure if there are any repercussions in doing so

Background:
My forum is not exactly big, only about 300K posts but it is running on a very modest dedicated server with only 1G ram. A usual mysql fulltext search takes around 3-5 seconds, but my users tend to use the search gratuitously and it got so bad that I had to disable post body search.

Now with sphinx each search takes around 0.1-0.2 seconds, so everything's cool again.
Attached Files
File Type: txt sphinx_utf.conf.txt (9.0 KB, 130 views)
Reply With Quote
  #542  
Old 05-03-2008, 08:40 PM
PSS PSS is offline
 
Join Date: Jul 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to say I really appreciate your contribution, scanlover. I'll try that code with my big board in couple of weeks, I have to set up a test system first for 3.7.

--------------- Added [DATE]1209851068[/DATE] at [TIME]1209851068[/TIME] ---------------

Quote:
Originally Posted by andrewkhunn View Post
Well, I know Xorlev *was* working on compiling a 3.7-ready complete version. It also appeared that he had been making some progress with similar threads and other outlaying issues to the current version we're all using.
Has anyone more info? If there is a Sphinx-to-Vb 3.7 (and any new version) integration package you can buy I'm interested. PM me if you can't write here.
Reply With Quote
  #543  
Old 05-04-2008, 03:08 AM
mack101 mack101 is offline
 
Join Date: May 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think I have this working on a 36M post board running latest Sphinx and VB 3.7 Great job to everyone who has contributed to this, I was able to get it up and running in about 5 hours (3.5 hours to index and sort)

However, I'm quite new to the process, is there anything that has to be done on the VB admincp side of things, or is it left as is? I removed the full text indexes from MySQL, and it looks to have reverted to internal search. Do the file edits in search.php override this?

Based on the test results in the forum it looks very promising so far. Thanks for any advice you folks can give me.
Reply With Quote
  #544  
Old 05-04-2008, 03:15 AM
scanlover scanlover is offline
 
Join Date: May 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont think vbulletin will switch to internal search just because you dropped the index.
As far as your vb is concerned, it still thinks the fulltext index is there. For example, I believe the 'similar threads' feature will try to use the fulltext index and so if you have that enabled you might get some errors. I'm not sure where else vB will try to use the fulltext index.

To change to local search you will need to use the 'Search Type' setting from admincp.
Reply With Quote
  #545  
Old 05-04-2008, 03:24 AM
mack101 mack101 is offline
 
Join Date: May 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. I think my mistake was removing the fulltext indices from VB admincp, which reverts the system to the VB internal engine. Whether it's actually using it, I can't say for certain.

I can't say I sound very sure of myself at this point

I guess what I need to confirm everything is working is a couple of sanity checks to validate the Sphinx setup and that vB is interfacing with it correctly.
Reply With Quote
  #546  
Old 05-04-2008, 01:36 PM
amcd amcd is offline
 
Join Date: Oct 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once you get sphinx working, you will know immediately. Your searches will run in 1/100th of the time it used to take, and your database load will ease out a lot.

Make sure vb adminCP is set to fulltext search. If it is set to default search, then your forum will keep running the code to update the index tables. Once you are sure sphinx is working properly, just drop the fulltext indexes (from mysql, not from vb admincp).
Reply With Quote
  #547  
Old 05-04-2008, 01:47 PM
ivanp ivanp is offline
 
Join Date: Sep 2007
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not really sure if indexes should be dropped.

I think other functions such is "Similar threads" depend on it. Should be checked.

--------------- Added [DATE]1209912502[/DATE] at [TIME]1209912502[/TIME] ---------------

Scanlover, many thanks for your detailed explanation!

I've just installed Sphinx and it seems to be working fantastic!
Reply With Quote
  #548  
Old 05-04-2008, 01:48 PM
Kevlar's Avatar
Kevlar Kevlar is offline
 
Join Date: Nov 2001
Location: Ft. Lauderdale, FL.
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Upgraded from 3.7 RC1 to 3.7 Gold. Things seem to be moving along fine.
Reply With Quote
  #549  
Old 05-05-2008, 06:05 AM
mack101 mack101 is offline
 
Join Date: May 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Running into a issue on my production server install.. the indexes grew to 62GB where it maxed out my disk space.

On the test server, using the same db, the indexes only used 39GB... What could be the cause of this?
Reply With Quote
  #550  
Old 05-05-2008, 06:14 AM
ivanp ivanp is offline
 
Join Date: Sep 2007
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mack101 View Post
Running into a issue on my production server install.. the indexes grew to 62GB where it maxed out my disk space.

On the test server, using the same db, the indexes only used 39GB... What could be the cause of this?
My guess is you were using --rotate switch, which temporarily creates copy of indexes. When it finishes, it replaces existing indexes. This is normal behavior.
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:04 AM.


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.06291 seconds
  • Memory Usage 2,272KB
  • 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
  • (2)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
  • (3)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
  • (1)postbit_attachment
  • (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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete