Programmers normally issue search queries using one or more client libraries that relate to the database on which the search is to be performed. Some programmers may also find it easier to write an SQL query than to use the Sphinx Client API library.
SphinxQL is used to issue search queries in the form of SQL queries. These queries can be fired from any client of the database in question, and returns the results in the way that a normal query would. Currently MySQL binary network protocol is supported and this enables Sphinx to be accessed with the regular MySQL API.
Let's take an example of MySQL CLI client program and see how we can use it to query Sphinx. We will use the same database and configuration file that we created in Chapter 7, Sphinx Configuration (for distributed searching).
Note
The following exercise uses the items database table from Chapter 7,Sphinx Configuration.