rkmax/sphinx-client

SphinxClient (SphinxAPI) for PHP5.3 and above to be used with SphinxSearch

1.0.1 2015-04-27 13:17 UTC

This package is not auto-updated.

Last update: 2024-06-08 16:10:09 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');

Source: Taken from the sf2 mailing list with some minor fixes

Para mayor información: sphinxsearch