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
sarahuk
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

Hi,

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
Sarah

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2906
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?

User avatar
darb
Joomla! Hero
Joomla! Hero
Posts: 2042
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden

Re: Smart Search Cron CLI running but not indexing

Post by darb » Mon Oct 09, 2023 4:06 pm

Did you get this to work with automatic indexer by cron or Joomla itself Task Scheduler? https://magazine.joomla.org/all-issues/ ... -scheduler

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2677
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Smart Search Cron CLI running but not indexing

Post by ceford » Mon Oct 09, 2023 5:33 pm

It would help to see the full stack trace. I think Joomla\CMS\Application\ConsoleApplication::getMenu() points to librararies/src/Application/ConsoleApplication.php which does not contain a getMenu method but it might be inherited.


Post Reply

Return to “Administration Joomla! 4.x”