Http://www.yzswyl.cn/blread-1612.html
The searchd daemon of sphtracing supports MySQL binary network protocol from version 0.9.9-rc2 and can be accessed through standard MySQL APIs. For example, the "mysql" command line program can work well. The following is an example of using the MySQL client to query Sphinx:
$ mysql -P 9306Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1Server version: 0.9.9-dev (r1734) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> SELECT * FROM test1 WHERE MATCH('test') -> ORDER BY group_id ASC OPTION ranker=bm25;+------+--------+----------+------------+| id | weight | group_id | date_added |+------+--------+----------+------------+| 4 | 1442 | 2 | 1231721236 || 2 | 2421 | 123 | 1231721236 || 1 | 2421 | 456 | 1231721236 |+------+--------+----------+------------+3 rows in set (0.00 sec)
Enabling method:
Of course, you only need to change the configuration file by adding a listener protocol of mysql41:
listen = localhost:9306:mysql41
Sphinx now supports a very small subset of SQL. We give this subset A nickname called SphinxQL. It only supports some syntaxes: for example, count (*) is not supported, and "& (and)" is not supported. [For more information about the number of summary results, see: How does sphinxql obtain the number of results? What are the detailed descriptions of show meta ?]
Other detailed usage reference: http://sphinxsearch.com/docs/1.10/sphinxql-reference.html