|
|
@ -83,12 +83,20 @@ foreach ($config->cli->document->crawl->skip->stripos->url as $condition) |
|
|
|
$index->search( |
|
|
|
$index->search( |
|
|
|
sprintf( |
|
|
|
sprintf( |
|
|
|
'@url "%s"', |
|
|
|
'@url "%s"', |
|
|
|
|
|
|
|
@\Manticoresearch\Utils::escape( |
|
|
|
$condition |
|
|
|
$condition |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
) |
|
|
|
)->limit( |
|
|
|
)->limit( |
|
|
|
isset($argv[1]) ? (int) $argv[1] : 10 |
|
|
|
isset($argv[1]) ? (int) $argv[1] : 10 |
|
|
|
)->get() as $document) |
|
|
|
)->get() as $document) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
// Make sure document contain exact substring in URL |
|
|
|
|
|
|
|
if (false === mb_strpos($document->get('url'), $condition)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Delete found document by it ID |
|
|
|
// Delete found document by it ID |
|
|
|
$result = $index->deleteDocument( |
|
|
|
$result = $index->deleteDocument( |
|
|
|
$document->getId() |
|
|
|
$document->getId() |
|
|
|