Merge branch 'dev-sphinx' of https://github.com/NNTmux/newznab-tmux into dev-sphinx

This commit is contained in:
DariusIII
2018-02-08 12:35:53 +01:00
7 changed files with 9 additions and 13 deletions
+2 -3
View File
@@ -1114,9 +1114,8 @@ class NameFixer
$join = '';
if (\strlen($preTitle) >= 15 && preg_match(self::PREDB_REGEX, $preTitle)) {
$titlematch = SphinxSearch::escapeString($preTitle);
$join .= sprintf(
$titlematch = SphinxSearch::escapeString($preTitle);
$join .= sprintf(
'INNER JOIN releases_se rse ON rse.id = r.id
WHERE rse.query = "@(name,searchname,filename) %s;mode=extended"',
$titlematch
+1 -3
View File
@@ -738,9 +738,7 @@ class ReleaseRemover
if ($this->crapTime === '') {
$regexMatch = $this->extractSrchFromRegx($dbRegex);
if ($regexMatch !== '') {
$ftMatch = sprintf('rse.query = "@(name,searchname) %s;limit=1000000;maxmatches=1000000;mode=any" AND', str_replace('|', ' ', str_replace('"', '', $regexMatch)));
$ftMatch = sprintf('rse.query = "@(name,searchname) %s;limit=1000000;maxmatches=1000000;mode=any" AND', str_replace('|', ' ', str_replace('"', '', $regexMatch)));
}
}
+1
View File
@@ -61,6 +61,7 @@ class ReleaseSearch
if ($forceLike) {
return $this->likeSQL();
}
return $this->sphinxSQL();
}
+1 -1
View File
@@ -3,9 +3,9 @@
namespace nntmux;
use App\Models\Release;
use Foolz\SphinxQL\Drivers\Pdo\Connection;
use Foolz\SphinxQL\Helper;
use Foolz\SphinxQL\SphinxQL;
use Foolz\SphinxQL\Drivers\Pdo\Connection;
class SphinxSearch
{