Extension:SphinxSearch/SphinxQL

SphinxQL is another way of querying Sphinx (Sphinx API being the other). It uses the MySQL 4.1 transport protocol and for this reason no API is required, any MySQL client can be used instead. SphinxQL is an SQL subset, similar to MySQL. The SphinxSearch extension is built on the Sphinx API. SphinxQL is useful for running queries from the command-line to see raw results and data. See From API to SphinxQL and Back Again additional information.

NOTE: These instructions are specific to a Windows installation.

Configuration
SphinxQL is included in the Sphinx installation so there is nothing else to install, just some configuration to enable access to it.
 * Set up SphinxQL by making the following changes to the sphinx.conf file in the # searchd settings:
 * Restart the Sphinx service to pick up the changes.

Verify query logging
Perform a search in the wiki application and verify that the SphinxQL output was logged in the query_log file specified: /* Sun Sep 22 10:08:42.274 2013 conn 1 wall 0.001 found 2884 */ SELECT * FROM wiki_main,wiki_incremental WHERE MATCH('msis') AND page_namespace=0 AND page_is_redirect=0;

Connect to SphinxQL

 * Connect to MySQL via the MySQLSphinxQL port:

Query via SphinxQL command-line
Run the SphinxQL from the query_log output file.

The Sphinx weight is not included in the results by default. Tell the query to include the weight in the results:

Unfortunately SphinxQL does not support JOINs so there is no way to pull in the page title in the results. A separate query against the regular MySQL port is required: