|
|
@ -6,6 +6,7 @@ namespace Kvazar\Index; |
|
|
|
|
|
|
|
|
|
|
|
use Manticoresearch\Client; |
|
|
|
use Manticoresearch\Client; |
|
|
|
use Manticoresearch\Index; |
|
|
|
use Manticoresearch\Index; |
|
|
|
|
|
|
|
use Manticoresearch\Utils; |
|
|
|
|
|
|
|
|
|
|
|
class Manticore |
|
|
|
class Manticore |
|
|
|
{ |
|
|
|
{ |
|
|
@ -181,11 +182,19 @@ class Manticore |
|
|
|
?array $filter = [], |
|
|
|
?array $filter = [], |
|
|
|
?array $sort = ['id' => 'desc'], |
|
|
|
?array $sort = ['id' => 'desc'], |
|
|
|
?int $offset = 0, |
|
|
|
?int $offset = 0, |
|
|
|
?int $limit = 10 |
|
|
|
?int $limit = 10, |
|
|
|
|
|
|
|
?bool $escape = true |
|
|
|
): array |
|
|
|
): array |
|
|
|
{ |
|
|
|
{ |
|
|
|
$records = []; |
|
|
|
$records = []; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($escape) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$query = @\Utils::escape( |
|
|
|
|
|
|
|
$query |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$search = $this->_index->search( |
|
|
|
$search = $this->_index->search( |
|
|
|
$query |
|
|
|
$query |
|
|
|
); |
|
|
|
); |
|
|
|