Friday, August 14, 2009

How to set sphinx.yml for Thinking-Sphinx (full text indexer)?

vi config/sphinx.yml

port: 3312
mem_limit: 512M
max_children: 300
max_matches: 100000
seamless_rotate: 1
preopen_indexes: 1
query_log_file: /mnt/app/rails/releases/code/log/searchd.query.log
searchd_log_file: /mnt/app/rails/releases/code/log/searchd.log
pid_file: /mnt/app/crawler/rails/code/log/
searchd_file_path: /mnt/app/rails/current/db/sphinx/production/


It is for Production mode, you can set same for development or staging mode just to change environment.

Access remote mysql database.

Grant all databases remotely to given IP address:

GRANT ALL ON *.* TO root@'' IDENTIFIED BY 'passwd';

If you want to Particular IP address :

GRANT ALL ON india.* TO root@'' IDENTIFIED BY 'passwd';