• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Sphinx Search Engine

Jeremy

Well-known member
#24
It would be nice to see you make it available here
Its custom as it does stuff related to my employers site specifically. Building the correct sphinx.conf, and following that guide, you'll be able to build one for yourself. Mine was designed to interact with my site specifically.
 
#29
One thing to note...

The plugin here is designed to have the Sphinx engine local to the XenForo instance. You have to modify this line:

library/SphinxSearch/Search/Sphinx.php

Code:
protected $_sphinx_server = 'localhost';
You need to change that to your IP of your SQL box where you install Sphinx (if it's not localhost). We run a backend DB for our forums.

Ryan
 

dutchbb

Well-known member
#30
I've been reading about this here and there, but still don't know what exactly it is :p

Why is it needed and if it is, then why is it not included by default in most forum software solutions?
 

mlx

Well-known member
#31
I've been reading about this here and there, but still don't know what exactly it is :p

Why is it needed and if it is, then why is it not included by default in most forum software solutions?
It's needed for big and busy forums. Depending on your hardware MySQL FT search queries might really slow down once you reach a million posts or something. That's where Sphinx comes into play.
 
#32
We have a dual quad core, 24 gigs of ram and 15k rpm drives in raid 10... Dedicated to just MySQL.

We had to deploy this because the SQL queries for searches were taking our board down.

This add-on indexes the data in your database and let's you search it faster.
 

whyweprotest

Well-known member
#34
I feel like I'm missing a step, but I cannot figure out where... I installed Sphinx, used your sphinx.conf as a base with the path to sphinx updated and the mysql auth info changed.. but when I try to install the addon it says:

Code:
Server Error

call_user_func() expects parameter 1 to be a valid callback, class 'SphinxSearch_Install' not found

XenForo_Application::handlePhpError()
call_user_func() in XenForo/Model/AddOn.php at line 214
XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 180
XenForo_ControllerAdmin_AddOn->actionInstall() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /var/www/xenforo/admin.php at line 13

So I thought maybe I had to run the indexer first, but when I try to do that it complains about missing tables that I assume get added by the addon?

Code:
using config file './sphinx.conf'...
indexing index 'xenforo_post'...
ERROR: index 'xenforo_post': sql_query_pre[2]: Table 'xenforo.sph_counter' doesn't exist (DSN=mysql://xenforo:***@localhost:3306/xenforo).
total 0 docs, 0 bytes
total 0.004 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'xenforo_post_delta'...
ERROR: index 'xenforo_post_delta': sql_query_range: : range-query failed: Table 'xenforo.sph_counter' doesn't exist (DSN=mysql://xenforo:***@localhost:3306/xenforo).
total 0 docs, 0 bytes
total 0.000 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'xenforo_thread'...
ERROR: index 'xenforo_thread': sql_query_pre[2]: Table 'xenforo.sph_counter' doesn't exist (DSN=mysql://xenforo:***@localhost:3306/xenforo).
total 0 docs, 0 bytes
total 0.002 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'xenforo_thread_delta'...
ERROR: index 'xenforo_thread_delta': sql_query_range: : range-query failed: Table 'xenforo.sph_counter' doesn't exist (DSN=mysql://xenforo:***@localhost:3306/xenforo).


woops forgot to include vitals: xen beta 5, sphinx beta 1.10, mysql 5.x
 

mlx

Well-known member
#35
Are you sure that you have uploaded the php files correctly?

Sounds to me like XenForo cannot find library/SphinxSearch/Install.php

And yes, those tables should be created when installing the AddOn xml file.
 

whyweprotest

Well-known member
#36
You are so right. I went back at it with a fresh set of eyes today and saw the file snafu. Thanks for getting my head into the right place, mlx!

I ran the indexer and it worked perfectly, as did the cmd line search test.. In the OP you mention that you run the full index every 24hrs and the delta every minute. I'm a bit new to sphinx and trying to get the gist of it all but does that mean:

you cron the indexer --all (maybe with the rotate) to run once a night?
and that you run the indexer to merge the delta tables with the full once a minute?
 
#37
If installed Sphinx 0.9.9-release - not working
searchd error: client version is higher than daemon version (client is v.1.23, daemon is v.1.22)
 
#40
Plugin works wonderfully, and your steps were very helpful! I do have a question about the search results returned..

If I search for "adomainofmine.com', i find threads that have it referenced. if i search for "adomainofmine" i get wildly diferent results. Also when searching for multiple keywords, it seems to not be looking for the words near eachother, or at least not in a terribly helpful way.

My question is, is this a limitation of sphinx, or a byproduct of the mysql query used within your suggested sphinx.conf?

Thx again