**User story:** As a non-WMF user of MediaWiki full-text search, I want to be able to configure custom analysis chains that are more appropriate for my use case.
**Meta-user story:** As a CirrusSearch developer, I want to know how difficult it would be to support the user story above, so we can consider implementing a hook to do so.
This issue came up in a discussion with @Svrl on the [[ https://www.mediawiki.org/wiki/Topic:Vxh0rmkyfef0pm70 | Cirrus help talk page ]].
For example: while you can specify `$wgLanguageCode = 'cs';`, that only allows you to enable the same specific analysis chain as used on cswiki. If we change that analysis on our end, it also changes for external users when they upgrade MediaWiki. If you want to do something different (like using the Czech stemmer + ICU folding), you can't easily do so (it may be possible with lots of hacking and manual maintenance, but that's sub-optimal).
@dcausse & @TJones discussed this some, and it seems like it should be possible to create a hook that allows the user to specify an arbitrary Elasticsearch analyzer (which they would have to set up and maintain outside CirrusSearch) for the `text`/`text_search` and/or `plain`/`plain_search` analyzers.
It //should// be a matter of specifying the name(s) of the custom analyzer(s) and having Cirrus copy them over to `text` and/or `plain`, but we all know things are often more complicated then they seem, so someone should find out.
**Acceptance Criteria:**
* An assessment of the likely work required and any obvious pitfalls of allowing custom configured analysis chains.
* A new ticket to actually do the implementation, unless (a) it is so trivial it can be done right away as part of this ticket, or (b) it is so non-trivial that we should not attempt it.