Page MenuHomePhabricator

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


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

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

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

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.

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