sokil / php-sphinxsearch
0.1
2014-03-13 05:58 UTC
Requires
- psr/log: ~1.0
This package is auto-updated.
Last update: 2024-08-28 01:33:09 UTC
README
PHP 对 sphinx 搜索 PECL 扩展的封装。以对象的形式处理搜索结果。
安装
您需要安装 sphinx pecl 扩展。对于基于 Ubuntu 或 Debian 的发行版
$ sudo apt-get install php5-dev php-pear libsphinxclient-dev
$ sudo pecl install sphinx
在 composer 中添加需求
{ "require": { "sokil/php-sphinxsearch": "dev-master" } }
基本用法
$qf = new QueryFactory('127.0.0.1', '23023'); $resultSet = $qf->find() ->in('idx_posts') ->match('If you can') ->fetch();