Recently, I tried using the CirrusSearch:UpdateWeightedTags maint. script to reset weighed tags for a page in my local environment:
I have no name!@9fdafa6fa954:/var/www/html/w$ php maintenance/run.php CirrusSearch:UpdateWeightedTags --reset --page=Stát --tagType=recommendation.image --verbose
[bb5b62cb4c3ee405c3649559] [no req] TypeError: CirrusSearch\Updater::resetWeightedTags(): Argument #2 ($tagPrefixes) must be of type array, string given, called in /var/www/html/w/extensions/CirrusSearch/maintenance/UpdateWeightedTags.php on line 64
Backtrace:
from /var/www/html/w/extensions/CirrusSearch/includes/Updater.php(281)
#0 /var/www/html/w/extensions/CirrusSearch/maintenance/UpdateWeightedTags.php(64): CirrusSearch\Updater->resetWeightedTags()
#1 /var/www/html/w/maintenance/includes/MaintenanceRunner.php(696): CirrusSearch\Maintenance\UpdateWeightedTags->execute()
#2 /var/www/html/w/maintenance/run.php(53): MediaWiki\Maintenance\MaintenanceRunner->run()
#3 {main}
I have no name!@9fdafa6fa954:/var/www/html/w$It seems there is an inconsistency between the expectations regarding $tagPrefix of WeighedTagsUpdater::resetWeightedTags() (which expects an array) and CirrusSearch:UpdateWeightedTags (which sends a singular string). This is a difference from WeighedTagsUpdater::updateWeightedTags() (which only accepts a singular prefix).