Sphinx Search Engine

Status
Not open for further replies.

mlx

OMG Member
Joined
Sep 9, 2008
Messages
39
Sphinx Search Engine v0.0.2 for XenForo v1.0.0 (gold/final/stable)

Please consider this a very first proof of concept beta release.

XenForo is new to me. So if I'm doing something terribly wrong here please let me know ;)

The following Installation and Upgrade instructions assume that you already know how to setup Sphinx Search Engine, including how to setup cronjobs to reindex your search index and update your delta search index inbetween. See below for a more detailed howto for CentOS5 (including how to setup Sphinx itself).

I've been using the latest Sphinx 1.10-beta release. An example sphinx.conf is included.

I believe it should work with Sphinx 0.9.9 as well. I didn't have time to test this though.


Quick Installation
  1. Upload all files from the "upload" folder to your XenForo directory
  2. Go to your XenForo Admin Control Panel and click Install Add-on
  3. Select addon_xt_sphinx.xml and click Install Add-on
  4. add the source and index definitions from the included sphinx.conf to your sphinx.conf
  5. reindex your search index
  6. enjoy your Sphinx Search Engine
  7. please report any bugs and suggestions
Quick Upgrade
  1. Upload all files from the "upload" folder to your XenForo directory
  2. Go to your XenForo Admin Control Panel and click List Add-ons
  3. Look for Sphinx Search Engine 0.0.1 and click Controls -> Upgrade
  4. Select addon_xt_sphinx.xml and click Upgrade Add-on
  5. enjoy your Sphinx Search Engine
  6. please note you no longer need to manually edit
    library/XenFor:wave:Search/SourceHandler/Abstract.php
  7. please report any bugs and suggestions
Detailed HowTo (for CentOS5)
(off the top of my head)

Download and compile Sphinx
  • Code:
         # wget http://sphinxsearch.com/files/sphinx-1.10-beta.tar.gz
         # tar xzvf sphinx-1.10-beta.tar.gz
         # cd sphinx-1.10-beta
         # ./configure --prefix=/usr/local/sphinxbeta
         # make
         # make install
         # useradd -M searchd
         # chown searchd.searchd /usr/local/sphinxbeta/var/data
         # chown searchd.searchd /usr/local/sphinxbeta/var/log
Setup your Sphinx config
Setup PHP scripts
  • Upload all files from the "upload" folder to your XenForo directory
  • Go to your XenForo Admin Control Panel and click Install Add-on
  • Select addon_xt_sphinx.xml and click Install Add-on
Setup startup script
  • Code:
           # cd /etc/init.d
           # vi searchd
  • press
  • paste the content from examples/searchd_initd
  • press
    [esc] :wq [enter]
  • Code:
           # chmod +x searchd
           # mkdir /var/run/sphinxbeta
           # chown searchd.searchd /var/run/sphinxbeta
           # /bin/su -c "/usr/local/sphinxbeta/bin/indexer --all" searchd
           # service searchd start
Setup cron scripts
Make sure searchd is up on reboot
  • Code:
           # chkconfig --add searchd
           # chkconfig searchd on
P.S. personally I'm reindexing every 24 hours at 4a.m. and run the delta each and every minute. This setup works fine for us, but we only have about 3 million posts to reindex anyway. So for really big forums a delta update every 5 minutes might be better (that would be */5 * * * * root run-parts /etc/cron.5minutes in crontab, in the howto above). And you need to decide when and if to run the reindex. That really depends on your setup and hardware I guess.
 

Attachments

  • SphinxSearch_0-0-2.zip
    26 KB · Views: 5

Floris

I'm just me :) Hi.
Staff member
Joined
Jan 1, 2001
Messages
60,101
I did not expect to see this for a while. Great job. Thanks for sharing it on XenFans!
 

George G Halstead

OMG Member
Joined
Oct 24, 2010
Messages
436
Wow, i am too very happy for this one. Xen already has some great minds at work. XeFans thanks for making available such a great resource for us to share.
 

mlx

OMG Member
Joined
Sep 9, 2008
Messages
39
1st post has been updated. v0.0.2 works fine with XenForo v1.0.0 final/gold/stable.

See Quick Upgrade if you are already running v0.0.1.

A more detailed HowTo (for CentOS5) has been added as well. Hope this helps.

P.S. I don't think I can edit the thread title myself. Could someone either change it to v0.0.2 or just drop the version number? Thanks!
 

Floris

I'm just me :) Hi.
Staff member
Joined
Jan 1, 2001
Messages
60,101
Big thumbs up for updating it. Rewarding you with a Premium membership :)
 
Status
Not open for further replies.
Top