1Installing sphinx package
Download Sphinx
second step
download plugin from github
2. git clone git://github.com/freelancing-god/thinking-sphinx.git
vendor/plugins/thinking-sphinx
3. now time to add indexing in the model
define_index do
indexes :name ,:sortable => true
indexes :location ,:sortable => true
end
Here i want to apply indexing in two field name and location
This is an important step if we are not adding index ,sphinx indexing is not working.
we can add index in any model
4. Now go project dir
cd // type rake ts:conf
this will create an configuration file in config older.type rake:in
start indexing
then rake:run
and finally run the demon for sphinx
5. sphinx is working
