Tatva-Artha

meaning of "it"

Setting up Sphinx Search on remote server

without comments

If you are using sphinx gem for search functionality in your rails application, here is a quick rundown of commands that you will need to install and setup sphinx server and rails plugin on remote server.

Download and installl Sphinx package:

# download from http://sphinxsearch.com/downloads.html
$ tar zxf <tar.gz file>
$ ./configure
$ make
$ sudo make install

The rails app should already list gem dependency. Install the necessary gem on system:

# environment.rb:
config.gem 'freelancing-god-thinking-sphinx', :lib => 'thinking_sphinx'
$ sudo gem install freelancing-god-thinking-sphinx

Here are 2 rake commands to index the database for sphinx search. And to start the sphinx daemon when the app is running.

$ rake thinking_sphinx:index (have a cron job for this)
$ rake thinking_sphinx:start (start the daemon)

There is also the capitate gem that makes managing sphinx on remote server easier.

http://www.tatvartha.com/wp-content/plugins/sociofluid/images/digg_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/reddit_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/stumbleupon_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/delicious_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/google_16.png http://www.tatvartha.com/wp-content/plugins/sociofluid/images/twitter_16.png

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Written by Sharad

September 30th, 2009 at 1:52 am

Posted in All

Leave a Reply