rkmax / sphinx-client
SphinxClient (SphinxAPI) 是用于 PHP5.3 及以上版本,与 SphinxSearch 一起使用的客户端
1.0.1
2015-04-27 13:17 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-09-28 17:54:30 UTC
README
Autoload.php
$loader->registerPrefixes(array(
// ...
'Sphinx' => __DIR__.'/../vendor/sphinx-client',
));
config.yml
services:
buscador:
class: Sphinx\SphinxClient
calls:
- [setArrayResult, [true]]
- [setLimits, [0, 20, 1000]]
*Action.php
$palabras = 'hola que tal';
$search = $this->get('buscador');
$results = $search->Query($palabras, 'nombre_index');
来源:从 sf2 邮件列表中提取,并进行了一些小修复
更多信息:sphinxsearch