1. Add the
searchd
config section to/usr/local/sphinx/etc/sphinx-blog.conf:
source blog { # source options } index posts { # index options } indexer { # indexer options } # searchd options (used by search daemon) searchd { listen = 9312 log = /usr/local/sphinx/var/log/searchd.log query_log = /usr/local/sphinx/var/log/query.log max_children = 30 pid_file = /usr/local/sphinx/var/log/searchd.pid }
2. Start the
searchd
daemon (as root user):$ sudo /usr/local/sphinx/bin/searchd -c /usr/local/sphinx/etc/sphinx-blog.conf
3. Copy the
sphinxapi.php
file (the class with PHP implementation of Sphinx API) from the sphinx source directory to your working directory:$ mkdir /path/to/your/webroot/sphinx $ cd /path/to/your/webroot/sphinx $ cp /path/to/sphinx-0.9.9/api/sphinxapi.php .
4. Create a
simple_search.php
script that uses the PHP client API class to search the Sphinx-blog index, and execute it in the browser:<?php require_once('sphinxapi.php...
Argentina
Australia
Austria
Belgium
Brazil
Bulgaria
Canada
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
France
Germany
Great Britain
Greece
Hungary
India
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Russia
Singapore
Slovakia
Slovenia
South Africa
South Korea
Spain
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine
United States