1. Download Sphinx from http://sphinxsearch.com 2.0.1-beta
2. Extract to the appropriate directory (here take D:\shpinx as an example)
3. Create a configuration file
Sphinx Package Default with Sphinx.conf.in,sphinx-min.conf.in,example.sql example, we can completely from
Sphinx-min.conf.in copy out a sphinx.conf to test.
Modify sphinx.conf necessary (database as data source): MySQL database connection item (build test data to database by reference example.sql); @CONFDIR @ Replace with the actual directory, and then manually build the directory and subdirectories, here for
D:\sphinx\data # Index Data Directory
D:\sphinx\log # Process file directory
4. Install Sphinx to Windows Services
Searchd.exe--install-c d:\sphinx\sphinx.conf--servicename sphinxsearch
Start the service
5. PHP Client Test
Enter the D:\sphinx\api directory, Sphinx provides PHP, Python, Ruby, C and other client code, if PHP programmers want to access Sphinx, including sphinxapi.php on it, Test.php is an example of access provided by Sphinx.
Before testing, you need to generate an index file into the D:\shpinx\data directory and enter D:\sphinx\bin execution
Indexer.exe-c d:\sphinx\sphinx.conf--all
The Sphinx must be restarted to take effect after successful operation. Perform test.php after reboot
PHP test.php Test