Browse Source

add random expression

main
yggverse 8 months ago
parent
commit
3f1d19ad18
  1. 6
      src/cli/document/clean.php

6
src/cli/document/clean.php

@ -87,6 +87,12 @@ foreach ($config->cli->document->crawl->skip->stripos->url as $condition) @@ -87,6 +87,12 @@ foreach ($config->cli->document->crawl->skip->stripos->url as $condition)
$condition
)
)
)->expression(
'random',
'rand()'
)->sort(
'random',
'asc'
)->limit(
isset($argv[1]) ? (int) $argv[1] : 10
)->get() as $document)

Loading…
Cancel
Save