Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nilportugues/php-sphinx-search
Sphinx for PHP 5.3 and above. Fully PHPUnit tested.
https://github.com/nilportugues/php-sphinx-search
php php7 sphinx sphinx-search sphinxclient sphinxsearch
Last synced: 11 days ago
JSON representation
Sphinx for PHP 5.3 and above. Fully PHPUnit tested.
- Host: GitHub
- URL: https://github.com/nilportugues/php-sphinx-search
- Owner: nilportugues
- License: mit
- Created: 2013-07-17T21:23:33.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-11T14:45:49.000Z (over 8 years ago)
- Last Synced: 2024-10-30T04:51:07.720Z (14 days ago)
- Topics: php, php7, sphinx, sphinx-search, sphinxclient, sphinxsearch
- Language: PHP
- Homepage: http://nilportugues.com
- Size: 159 KB
- Stars: 18
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Sphinx for PHP 5.3 and above
[![Build Status](https://travis-ci.org/nilportugues/php-sphinx-search.png?branch=master)](https://travis-ci.org/nilportugues/php-sphinx-search)
[![Latest Stable Version](https://poser.pugx.org/nilportugues/sphinx-search/v/stable.svg)](https://packagist.org/packages/nilportugues/sphinx-search) [![Total Downloads](https://poser.pugx.org/nilportugues/sphinx-search/downloads.svg)](https://packagist.org/packages/nilportugues/sphinx-search) [![License](https://poser.pugx.org/nilportugues/sphinx-search/license.svg)](https://packagist.org/packages/nilportugues/sphinx-search)This class is a port of the original Sphinx API class by **Andrew Aksyonoff** and [Sphinx Technologies Inc][1] to PHP 5.3 and above.
## 1. Requirements
* Composer
* PHP 5.3 or above
* SphinxSearch## 2. Added removeFilter
While all the existing methods are available and vastly documented in the [Sphinx Documentation][2], this version of the SphinxClient for PHP includes a new method.* **removeFilter**: The original SphinxClient allows you to clear all filters. This method removes a specific filter previously set.
```php
setServer('127.0.0.1',9312);// Do search...
// Result would contain "The Amazing Spider-Man 2", to be in theatres in 2014.
$sphinxSearch->setFilter('year',array(2014));
$result = $sphinxSearch->query('Spiderman','movies');// Unset the filter to stop filtering by year
// Now we'll get all the Spiderman movies.
$sphinxSearch->removeFilter('year');
$result = $sphinxSearch->query('Spiderman','movies');
```
## 3. Added chainable methods
While updating the code, chaining capability has been added. SphinxClient's setters can be chained resulting in a cleaner code.
```php
$sphinxSearch = new \NilPortugues\Sphinx\SphinxClient();$result = $sphinxSearch
->setFilter('year',array(2014))
->query('Spiderman','movies')
;
```## 5. Author
Nil Portugués Calderó
-
- http://nilportugues.com[1]: [http://sphinxsearch.com/]
[2]: [http://sphinxsearch.com/docs/current.html]