|
|
@ -150,13 +150,13 @@ switch (true) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Escape special chars |
|
|
|
// Escape special chars |
|
|
|
$q = @\Manticoresearch\Utils::escape( |
|
|
|
$request = @\Manticoresearch\Utils::escape( |
|
|
|
$q |
|
|
|
$q |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Explode search phrase |
|
|
|
// Explode search phrase |
|
|
|
$words = []; |
|
|
|
$words = []; |
|
|
|
foreach ((array) explode(' ', $q) as $word) |
|
|
|
foreach ((array) explode(' ', $request) as $word) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$words[] = trim( |
|
|
|
$words[] = trim( |
|
|
|
$word |
|
|
|
$word |
|
|
@ -167,7 +167,7 @@ switch (true) |
|
|
|
$query = $index->search( |
|
|
|
$query = $index->search( |
|
|
|
sprintf( |
|
|
|
sprintf( |
|
|
|
'"%s"|%s', |
|
|
|
'"%s"|%s', |
|
|
|
$q, |
|
|
|
$request, |
|
|
|
implode( |
|
|
|
implode( |
|
|
|
'|', |
|
|
|
'|', |
|
|
|
$words |
|
|
|
$words |
|
|
|