mirror of
https://github.com/Oreolek/kohana-sphinxql.git
synced 2024-04-28 23:29:27 +03:00
Adapt module for kohana 3.2. Change config
This commit is contained in:
parent
73e3685fbd
commit
bba58121a6
13
README
13
README
|
@ -1,18 +1,9 @@
|
|||
SphinxQL for Kohana
|
||||
SphinxQL for Kohana 3.2
|
||||
===================
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
I wrote this because the other Kohana Sphinx plugin on github was reliant on
|
||||
the pure PHP sphinx API and was discontinued. This plugin, as suggested by its
|
||||
name, uses the SphinxQL interface. This means there's less dependancies as it
|
||||
uses the built-in MySQL interface from PHP. _NOTE_: to use this, MySQL server
|
||||
does _NOT_ need to be installed on the server. Only the MySQL client library for
|
||||
PHP is required. As the MySQL interface in PHP is built as an extension, it's
|
||||
faster than the regular Sphinx API as well, you can check the benchmarks out
|
||||
here: http://sphinxsearch.com/blog/2010/04/25/sphinxapi-vs-sphinxql-benchmark/
|
||||
|
||||
This is sphinx plugin for kohana 3.2
|
||||
Requirements
|
||||
------------
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class Kohana_SphinxQL_Core {
|
|||
*/
|
||||
public function __construct($profile='default', array $config=null) {
|
||||
if ($config === null) { $config = array(); }
|
||||
$config = Arr::merge(Kohana::config('sphinxql.'.$profile), $config);
|
||||
$config = Arr::merge(Kohana::$config->load('sphinxql.'.$profile), $config);
|
||||
foreach ($config['servers'] as $name => $server) { $this->add_server($name, $server); }
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ return array(
|
|||
|
||||
// ...or!
|
||||
//'my_only_server' => '127.0.0.1:2222',
|
||||
'my_only_server' => '127.0.0.1:9312',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue