Skip to content

Configuring Sphinx

cjsaylor edited this page Mar 30, 2011 · 1 revision

How Sphinx is used

Sphinx is a nice indexing application that provides an extremely fast full-text index extension on MySQL databases. The application uses the PHP layer to query the sphinx searchd for a specific phrase, and returns the IDs of matching items. With these returned IDs, we can then use a very fast lookup of the items based on the indexed ID from MySQL.

Configuring Sphinx

The configuration file is committed to the /config directory. It contains the relevant MySQL queries necessary to build the external index files for lookup.

Simply add the credentials and schema to use for the main index.

Sphinx Configuration Base

Running Sphinx

The application search functionality depends on two indexes: container_items and container_items_delta. The container_items index is designed to reindex the entire container_items table; as such, this index should be run infrequently due to its long execution time. The delta index works off a much smaller subset of the table and is designed to run frequently. The delta will index all items from the last time the main index was run.

Clone this wiki locally