Skip to content

Latest commit

 

History

History
101 lines (65 loc) · 3.48 KB

README.md

File metadata and controls

101 lines (65 loc) · 3.48 KB

OpenSphinxSearch

OpenSphinxSearch provides a RESTful OpenSearch API to the Sphinx Fulltext Searchserver. The REST interface is fully configurable and the output fully customizable with templates.

Basics

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.

Installation

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:

  1. Install Composer
  2. Clone the GitHub repository to a local directory of your choice (not your webroot).
  3. CD into the project directory and use composer install to install the dependencies
  4. Copy configuration.example.json to configuration.json and modify the file with your own settings (use configuration.example.full.json as a reference)
  5. 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.
  6. 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).

Configuration

Yet to come.

Index setup

Yet to come.

Endpoints

Yet to come.

Search

Yet to come.

Query settings

Yet to come.

By configuration only

Yet to come.

By configuration or URL parameter

Yet to come.

By URL parameter only

Yet to come.

Suggest

Yet to come.

Keywords

Yet to come.

Excerpts

Yet to come.

Templating

Yet to come.

Credits

Released under MIT license. @author: Torsten Schrade (@metacontext)