Smart Search Cron CLI running but not indexing

Need help with the Administration of your Joomla! 4.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Feb 20, 2023 4:18 pm

Smart Search Cron CLI running but not indexing

Post by sarahuk » Fri Jun 09, 2023 11:10 am


I'm trying to set up a cron job to reindex Smart Search Index. The reason we need this is that when an EDocman document is unpublished or deleted the index doesn't automatically update, so we end up with lots of out of date results.

/usr/local/bin/php /home/xxxxx/public_html/cli/joomla.php finder:index

We can see that the cron fired off:

Jun 9 11:45:01 server CROND[3743693]: (xxxxx) CMD (/usr/local/bin/php /home/xxxxx/public_html/cli/joomla.php finder:index)

We also tried running it manually at the command line and it returns the following output:
[xxxxx@server ~]$ /usr/local/bin/php /home/xxxxx/public_html/cli/joomla.php finder:index
Finder Indexer

Starting Indexer
Setting up Smart Search plugins
Setup 4150 items in 0.037 seconds.

In route.php line 271:

Call to undefined method Joomla\CMS\Application\ConsoleApplication::getMenu()

finder:index [--minproctime MINPROCTIME] [--pause PAUSE] [--divisor DIVISOR] [--live-site [LIVE-SITE]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--] <command> [<purge>]

[xxxxx@server ~]$

Also, is it possible to purge and then reindex, or does Joomla 4 do that automatically? We tried

/usr/local/bin/php /home/xxxxx/public_html/cli/joomla.php finder:index --purge
which failed and

/usr/local/bin/php /home/xxxxx/public_html/cli/joomla.php finder:index purge
which purged but didn't reindex

Indexing works fine when you reindex from the Smart Search component. It's just running it at the command line or via a cron job that fails.

Joomla 4.3.2
PHP 8.1.19

Thank you

Joomla! Hero
Joomla! Hero
Posts: 2717
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Smart Search Cron CLI running but not indexing

Post by SharkyKZ » Fri Jun 09, 2023 12:45 pm

In route.php line 271:
Where is this route.php?

Post Reply

Return to “Administration Joomla! 4.x”