php-sphinx-search

Sphinx for PHP 5.3 and above. Fully PHPUnit tested.

Github星跟踪图

Sphinx for PHP 5.3 and above

Build Status
Latest Stable Version Total Downloads License

This class is a port of the original Sphinx API class by Andrew Aksyonoff and Sphinx Technologies Inc 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, 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

$sphinxSearch = new \NilPortugues\Sphinx\SphinxClient();

//Do connection and set up search method...
$sphinxSearch->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.

$sphinxSearch = new \NilPortugues\Sphinx\SphinxClient();

$result = $sphinxSearch
                ->setFilter('year',array(2014))
                ->query('Spiderman','movies')
        ;

5. Author

Nil Portugués Calderó

主要指标

概览
名称与所有者nilportugues/php-sphinx-search
主编程语言PHP
编程语言PHP (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2013-07-17 21:23:33
推送于2016-03-11 14:45:49
最后一次提交2016-03-11 15:34:26
发布数5
最新版本名称1.0.3 (发布于 )
第一版名称1.0.0 (发布于 )
用户参与
星数18
关注者数2
派生数6
提交数118
已启用问题?
问题数3
打开的问题数1
拉请求数3
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?