Page MenuHomePhabricator

CirrusSearch on Vagrant throws "mapper_parsing_exception: analyzer [aa_plain] not found for field [plain]" on provision
Closed, ResolvedPublic

Description

After enabling the mediainfo repo (which pulls in wikibasecirrussearch alongside a truckload of other things) and provisioning, I get

==> default: Notice: /Stage[main]/Role::Cirrussearch/Mediawiki::Maintenance[build_search_index]/Exec[build_search_index]/returns: Couldn't update existing mappings. You may need to reindex.
==> default: Notice: /Stage[main]/Role::Cirrussearch/Mediawiki::Maintenance[build_search_index]/Exec[build_search_index]/returns: Here is elasticsearch's error message: mapper_parsing_exception: analyzer [aa_plain] not found for field [plain]

on the main wiki (where WikibaseRepo and WikibaseMediaInfo are enabled) but not otherwise.

Event Timeline

Tgr created this task.Aug 7 2019, 12:11 PM
Restricted Application added a project: Discovery-Search. · View Herald TranscriptAug 7 2019, 12:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr added a comment.Aug 7 2019, 3:53 PM

The only place where aa_plain is even mentioned is a test case. So this could be a case of a test polluting a production index... except I have never run CirrusSearch tests on this vagrant box. And in any case, dropping the index manually and reprovisioning recreates it with the same error.

debt triaged this task as Normal priority.Aug 8 2019, 5:04 PM
debt edited projects, added Discovery-Search (Current work); removed Discovery-Search.

Change 533285 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/vagrant@master] [mediainfo] Always enable WBCS

https://gerrit.wikimedia.org/r/533285

dcausse added a subscriber: dcausse.

WikibaseCirrusSearch is responsible for generating proper settings (e.g. the aa_plain analyzer) and when it is disabled creating the index will fail with this error.
We should probably have a better error and try to test from MediaInfo if WikibaseCirrusSearch is actually enabled before adding such fields.
The immediate fix is to enable WBCS.

dcausse claimed this task.Aug 29 2019, 6:11 PM

Change 533285 merged by jenkins-bot:
[mediawiki/vagrant@master] [mediainfo] Always enable WBCS

https://gerrit.wikimedia.org/r/533285

debt closed this task as Resolved.Sep 5 2019, 6:30 PM