Sphinx/mysql protocol support and SPHINXQL application example _mysql

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.