OpenSphinxSearch provides a RESTful OpenSearch API to the Sphinx Fulltext Searchserver. The REST interface is fully configurable and the output fully customizable with templates.
OpenSphinxSearch is based on the Slim PHP Framework (version 2), the Sphinx PHP API and Twig as template engine.
OpenSphinxSearch has been successfully tested with PHP 5.6.x - 7.x.x and Sphinxsearch 2.2.x. It might work on more recent versions of Sphinx as well.
This is beta software (fully usable) but documentation is still missing. Future releases will be refactored to use recent versions of PHP libraries and of Sphinxsearch. But it is on the roadmap to keep all currently implemented functionality as stable as possible during refactoring and provide an easy migration path (if necessary at all).
If you find any issues in the current version do not hesitate to report them in our issue tracker. You are very welcome to send in pull requests as well.
OpenSphinxSearch uses Composer as a package manager. First of all you will of course need a working Sphinx server. The installation procedure for the OpenSphinxSearch package works as follows:
- Install Composer
- Clone the GitHub repository to a local directory of your choice (not your webroot).
- CD into the project directory and use
composer install
to install the dependencies - Copy configuration.example.json to configuration.json and modify the file with your own settings (use configuration.example.full.json as a reference)
- Optionally copy the view directory to a templates directory (this is ignored from git versioning) and modify the Twig templates to your needs. Don't forget to configure the new templates directory in your configuration.json file.
- Point your webserver (vhost) to the public directory of your installation and make sure that all requests are routed through the index.php file (an .htaccess file for Apache is included; for Nginx you need to tweak your vhost configuration depending on your webserver installation)
Open your browser and navigate to the URL under which you have installed OpenSphinxSearch. The base URL provides you with a simple HTML page that references the (dynamically generated) OpenSearch description. The next segments in the URL are your configured index names. Each configured index then provides the following four REST entry points: search (for fulltext search), suggest (for Open Search suggestions), keywords (for disambiguating submitted keywords) and excerpts (for submitting snippets that should be returned with highlighted keywords).
Yet to come.
Yet to come.
Yet to come.
Yet to come.
Yet to come.
Yet to come.
Yet to come.
Yet to come.
Yet to come.
Yet to come.
Yet to come.
Yet to come.
Released under MIT license. @author: Torsten Schrade (@metacontext)