Advanced Sphinx Search in a PHP Application (Part 2)

In part one of this series I discussed the basics of getting a Sphinx search up and running in a custom PHP application. However, Sphinx has so many features and options that the previous article really only scratched the surface of what can be done, so in this post we'll get into some of the more advanced tricks and techniques that can be employed to customize your search results. Specifically, we'll cover how to handle pagination and custom weighting.

Integrating Sphinx Search into a PHP Application (Part 1)

We recently re-developed an application that was originally built using ASP Classic and MS SQL Server and converted it into PHP/MySQL and along the way, one of our goals was to simplify the search system. The original application had individual searches for specific content types -- for example, if you wanted to search for documents you would have to browse to that area and click the search drop-down. The fields listed there would be things like document title, date posted, document type, etc.