mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Create local variable for Helper class in SphinxSearch
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
2018-02-12 DariusIII
|
||||
* Chg: Create local variable for Helper class in SphinxSearch
|
||||
* Fix: Fix wrong categories used in searchByImdbId function
|
||||
* Chg: Update exeu/apai-io to version 2.2.0
|
||||
* Chg: Update composer.json, remove ext-yenc suggestion and add ext-bcmath as required
|
||||
|
||||
@@ -24,6 +24,11 @@ class SphinxSearch
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var \Foolz\SphinxQL\Helper
|
||||
*/
|
||||
protected $helper;
|
||||
|
||||
/**
|
||||
* Establish connection to SphinxQL.
|
||||
*
|
||||
@@ -35,6 +40,7 @@ class SphinxSearch
|
||||
$this->config = config('sphinxsearch');
|
||||
$this->connection->setParams(['host' => $this->config['host'], 'port' => $this->config['port']]);
|
||||
$this->sphinxQL = SphinxQL::create($this->connection);
|
||||
$this->helper = Helper::create($this->connection);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,7 +116,7 @@ class SphinxSearch
|
||||
*/
|
||||
public function truncateRTIndex(): void
|
||||
{
|
||||
Helper::create($this->connection)->truncateRtIndex($this->config['index']);
|
||||
$this->helper->truncateRtIndex($this->config['index']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,7 +124,7 @@ class SphinxSearch
|
||||
*/
|
||||
public function optimizeRTIndex(): void
|
||||
{
|
||||
Helper::create($this->connection)->flushRtIndex($this->config['index']);
|
||||
Helper::create($this->connection)->optimizeIndex($this->config['index']);
|
||||
$this->helper->flushRtIndex($this->config['index']);
|
||||
$this->helper->optimizeIndex($this->config['index']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user