From 3f1d19ad185907d9f76eb5cb0992b26e79f519b8 Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 21 Mar 2024 19:00:38 +0200 Subject: [PATCH] add random expression --- src/cli/document/clean.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cli/document/clean.php b/src/cli/document/clean.php index d76c347..580333f 100644 --- a/src/cli/document/clean.php +++ b/src/cli/document/clean.php @@ -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)