Friday, April 2, 2010

Thinking sphinx

Hi,

This is a Great plugin in Rails for the search options. This comes with many inbuilt functionalities. There are many tutorials & Videos on how to work this.

But I struggled a lot in Installation.

1. I have installed the Thinking sphinx Plugin, But there was error

srikanth@client30:~/project$ rake thinking_sphinx:index

Sphinx cannot be found on your system. You may need to configure the following
settings in your config/sphinx.yml file:
* bin_path
* searchd_binary_name
* indexer_binary_name

For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html
Generating Configuration to /home/srikanth/projects/
thisproject/config/development.sphinx.conf


Solution : You will have to download and install the sphinx software. Thinking sphinx is only a wrapper around sphinx.

You can get sphinx at http://sphinxsearch.com/


2) After I Install sphinx, when I start it
srikanth@client30:~/projects/
my project$ rake thinking_sphinx:start
(in /home/srikanth/projects/my project)
Failed to start searchd daemon. Check /home/srikanth/projects/my project/log/searchd.log.
Failed to start searchd daemon. Check /home/srikanth/projects/my project/log/searchd.log

Solution: you need to configure and start the sphinx daemon

rake thinking_sphinx:configure
rake thinking_sphinx:start


& This should work.. It worked for me when i did

rake thinking_sphinx:start -t



Now everything works fine :):)

Thanks,
Srikanth

3 comments:

Ritesh Kumar said...

For such errors on Windows system, you need to configure bin path in 'config/sphinx.yml'. For details you can refer to "http://rorguide.blogspot.com/2011/05/thinking-sphinx-giving-error-failed-to.html"

Rafiu said...

Hi,

I am using rails 2.3.4, thinking-sphinx - 1.4.4, raspell 1.0.0 and riddle - 1.2.2. in my application

Now I would like to add fuzzy match in sphinx search, so I added in my config/environment.rb file I added the following lines:

config = ThinkingSphinx::Configuration.instance

config.raspell.dictionary = 'en'

config.raspell.suggestion_mode = :badspellers

Ref - https://github.com/freelancing-god/thinking-sphinx-raspell

while starting my server it throws the error like this

undefined method `raspell' for
# (NoMethodError)
Can you help me on this?

Rafiu said...

Hi,

I am using rails 2.3.4, thinking-sphinx - 1.4.4, raspell 1.0.0 and riddle - 1.2.2. in my application

Now I would like to add fuzzy match in sphinx search, so I added in my config/environment.rb file I added the following lines:

config = ThinkingSphinx::Configuration.instance

config.raspell.dictionary = 'en'

config.raspell.suggestion_mode = :badspellers

Ref - https://github.com/freelancing-god/thinking-sphinx-raspell

while starting my server it throws the error like this

undefined method `raspell' for
# (NoMethodError)
Can you help me on this?