A couple months ago, had a mediawiki server with 3 wikis running on it dumped in my lap to support. The search box was using CirrusSearch and Elasticsearch / Elastica to generate results, but that was recently broken when the security team did some sort of log4j remediation. All searches would return "An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later."
So, I removed most traces of CirrusSearch / Elasticsearch and then had the bare-bones MediaWiki search working and of course no longer received the above error. Our server was running back-level MediaWiki (1.30), so I just brought the software up to nearly the latest versions.
Centos 7.3.1611
Versions
MediaWiki - 1.37.2
PHP - 7.4.28 (apache2handler)
MySQL - 5.7.20
CirrusSearch - 6.5.4 (70b9a7e) 05:55, 16 March 2022
Elastica - 6.1.3 (c2b259b) 05:46, 19 January 2022
# yum list installed|grep elastic
elasticsearch.noarch 6.8.23-1 @elasticsearch6
elasticsearch-curator.x86_64 5.4.1-1 installed
I reenabled CirrusSearch and Elastica in LocalSettings.php, and my Version page shows them as loaded, but while I'm still not getting errors, the search results don't seem like they are enhanced in any way. How can I confirm whether or not I'm actually getting results from Elasticsearch instead of the default built-in search?
I suspect I already have my answer in that my attempt to regenerate my Elasticsearch index fails with the response below. So I guess the real question is how do I fix Elasticsearch for my wikis?
# php /data/www/html/wiki/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php
Updating cluster ...
indexing namespaces...
Elastica\Exception\Connection\HttpException from line 190 of /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php: Couldn't connect to host, Elasticsearch down?
#0 /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Request.php(194): Elastica\Transport\Http->exec()
#1 /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Client.php(689): Elastica\Request->send()
#2 /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Client.php(721): Elastica\Client->request()
#3 /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Index.php(586): Elastica\Client->requestEndpoint()
#4 /data/www/html/wiki/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Index.php(330): Elastica\Index->requestEndpoint()
#5 /data/www/html/wiki/extensions/CirrusSearch/includes/MetaStore/MetaStoreIndex.php(501): Elastica\Index->exists()
#6 /data/www/html/wiki/extensions/CirrusSearch/includes/MetaStore/MetaStoreIndex.php(165): CirrusSearch\MetaStore\MetaStoreIndex::cirrusReady()
#7 /data/www/html/wiki/extensions/CirrusSearch/includes/Maintenance/Maintenance.php(221): CirrusSearch\MetaStore\MetaStoreIndex->createIfNecessary()
#8 /data/www/html/wiki/extensions/CirrusSearch/maintenance/IndexNamespaces.php(36): CirrusSearch\Maintenance\Maintenance->maybeCreateMetastore()
#9 /data/www/html/wiki/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php(65): CirrusSearch\Maintenance\IndexNamespaces->execute()
#10 /data/www/html/wiki/maintenance/doMaintenance.php(108): CirrusSearch\Maintenance\UpdateSearchIndexConfig->execute()
#11 /data/www/html/wiki/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php(103): require_once('/data/www/html/...')
#12 {main}