An example of how to do faceted searching with Sphinx.
PHP Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
index.html Removed unusable key and updated README to reflect. May 11, 2010
load.rb Adding schema used for stack overflow CC data dump. May 16, 2010
searchapi.php Newly added. May 11, 2010
searchrequest.php Newly added. May 11, 2010
spinner.gif Added the spinner graphic. May 11, 2010

Example Sphinx Faceted Search


This is an example of doing faceted search using the Sphinx Search engine.


The Sphinx Search engine, the Sphinx Search PHP API and a database modeled against the Stack Overflow CC data dump.


  • Install the Sphinx Search engine
  • Install the PHP scripts and the index.html file in a directory that can run PHP
  • Modify the config.php file to reflect your Sphinx Search server and database
  • Load the database with data from the Stack Overflow CC data dump
  • Run the Sphinx Search engine indexer again the database
  • Modify the index.html file to include a jQuery key from the Google CDN


Copyright (c) 2010 Carson McDonald

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.