In the previous chapter we learned how to create indexes. Now let's see how to search those indexes from within your applications.
In this chapter we will learn how to use the Sphinx API to issue search queries from your PHP applications. We will examine different query syntaxes and learn about weighting, sorting, and grouping our search results.
We will be using the indexes created in Chapter 3, Indexing and write search queries to search those indexes.
Sphinx comes with a number of native searchd
client API implementations. At the time of writing this book, Sphinx came with PHP, Python, and Java implementations. Some third-party open source implementations for Perl, Ruby, and C++ are also available.
All APIs provide the same set of methods and they implement the same network protocol. As a result, they more or less all work in a similar fashion, they all work in a similar fashion.