1, Download Sphinx search engine from Sphinx
1 | wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.tar.gz |
2, Install MySQL mysql-devel
1 | yum install mysql-devel |
3, Configure Sphinx
1 | cd sphinx-0.9.8 |
4, Create a configuration file
1 | cd /home/sphinx/sphinxsearch/etc |
5, Edit sphix.conf
vi sphinx.conf
Configuration file sphinx.conf for wordpress
1 | source mywhiteboard |
6, make a directory for indexes
mkdir /home/sphinx/sphinxsearch/var/data/mywhiteboard
7, Start indexer:
home/sphinx/sphinxsearch/bin/indexer --config /home/sphinx/sphinxsearch/etc/sphinx.conf --all
Sphinx 0.9.8-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff
using config file '/home/sphinx/sphinxsearch/etc/sphinx.conf'...
indexing index 'mywhiteboard'...
collected 1104407 docs, 1938.9 MB
sorted 6551.8 Mhits, 98.5% donedone
total 1104407 docs, 1938867135 bytes
total 5126.826 sec, 378180.78 bytes/sec, 215.42 docs/sec
8, To test if it is working:
1 | /home/sphinx/sphinxsearch/bin/search --config /home/sphinx/sphinxsearch/etc/sphinx.conf insulin |
....
20\. document=9345, weight=3
id=9345
....
words:
1\. 'insulin': 30601 documents, 109926 hits
1 | ls -la |
wordpress-sphinx-search 插件的安装教程
http://www.ivinco.com/software/wordpress-sphinx-search-tutorial/