The Sphinx searchd Daemon supports the MySQL binary network protocol from version 0.9.9-rc2 and is accessible through the standard MySQL API.
For example, the "MySQL" command-line program works well.
The following is an example of a Sphinx query with a MySQL client:
Copy Code code as follows:
$ mysql-p 9306
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 1
Server 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)
Open method:
Only need to change one line of configuration file, add a protocol for MYSQL41 listener can:
Listen = Localhost:9306:mysql41
Sphinx also supports a very small subset of SQL, and we give this subset a nickname called SPHINXQL.
It only supports partial syntax: such as: count (*) is not supported, if you want to find the total number of results reference: SPHINXQL How to get the number of results? A detailed description of the show meta? "& (with) operations" is not supported.
For more content use please refer to: http://sphinxsearch.com/docs/1.10/sphinxql-reference.html