Page MenuHomePhabricator

updateSuggesterIndex.php tries to recycle non-existing index
Closed, ResolvedPublic


When I try to update suggester index on an install that never had this index before, I get exception:

vagrant@mediawiki-vagrant:/vagrant/mediawiki$ mwscript extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki cirrustestwiki
Fetching Elasticsearch version...1.7.1...ok
Infering index identifier...cirrustestwiki_titlesuggest_1454353233

Unexpected Elasticsearch failure.
Elasticsearch failed in an unexpected way.  This is always a bug in CirrusSearch.
Error type: Elastica\Exception\NotFoundException
Message: doc id cirrustestwiki_titlesuggest not found
#0 /vagrant/mediawiki/extensions/CirrusSearch/maintenance/updateSuggesterIndex.php(283): Elastica\Type->getDocument('cirrustestwiki_...')
#1 /vagrant/mediawiki/extensions/CirrusSearch/maintenance/updateSuggesterIndex.php(204): CirrusSearch\Maintenance\UpdateSuggesterIndex->canRecycle()
#2 /vagrant/mediawiki/maintenance/doMaintenance.php(103): CirrusSearch\Maintenance\UpdateSuggesterIndex->execute()
#3 /vagrant/mediawiki/extensions/CirrusSearch/maintenance/updateSuggesterIndex.php(698): require_once('/vagrant/mediaw...')
#4 /var/www/w/MWScript.php(89): require_once('/vagrant/mediaw...')
#5 {main}

Looks like it tries to recycle index that does not exist. If I disable $wgCirrusSearchRecycleCompletionSuggesterIndex it works and then enabling it back works too.


Related Gerrit Patches:

Event Timeline

Smalyshev created this task.Feb 1 2016, 7:23 PM
Smalyshev raised the priority of this task from to Needs Triage.
Smalyshev updated the task description. (Show Details)
Smalyshev added a project: Discovery.
Smalyshev added subscribers: Smalyshev, dcausse, EBernhardson.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 1 2016, 7:23 PM
Smalyshev moved this task from Needs triage to Search on the Discovery board.Feb 1 2016, 8:06 PM

Change 267857 had a related patch set uploaded (by DCausse):
Properly check for titlesuggest index presence in mw_cirrus_versions

dcausse claimed this task.Feb 2 2016, 10:55 AM
dcausse set Security to None.
dcausse moved this task from In Progress to Needs review on the Discovery-Search (Current work) board.

Change 267857 merged by jenkins-bot:
Properly check for titlesuggest index presence in mw_cirrus_versions

Deskana closed this task as Resolved.Feb 3 2016, 6:19 PM
Deskana triaged this task as Medium priority.
Deskana moved this task from Search to On Sprint Board on the Discovery board.
Deskana added a subscriber: Deskana.