Steps to replicate the issue (include links if applicable):
- Install Wikibase, CirrusSearch and WikibaseCirrusSearch on a wiki, including the org.wikimedia.search:extra plugin (but not the org.wikimedia.search.highlighter:experimental-highlighter-elasticsearch-plugin plugin)
- Add an item to the wiki (or, if it already had an item, rebuild the search index)
- Search for the item using the regular search (works)
- Search for the item using wbsearchentities
What happens?:
No results. If you add a lot of var_export()s in random places (have fun! editor’s note: this was not fun), you’ll eventually find that the $mresults in CirrusSearch\Searcher::searchOne() contains, deeply nested, something like this:
'failures' => array ( 0 => array ( 'shard' => 0, 'index' => 'mediawiki_content_first', 'node' => 'rHjo5kMtQ6uGWoUXTiFAcw', 'reason' => array ( 'type' => 'illegal_argument_exception', 'reason' => 'unknown highlighter type [experimental] for the field [title]', ), ), ),
And if you scroll further up, you’ll see that the query includes things like (note the first and last line):
'highlight' => array ( 'pre_tags' => array ( 0 => '', ), 'post_tags' => array ( 0 => '', ), 'fields' => array ( 'title' => array ( 'type' => 'experimental',
So apparently, CirrusSearch or WikibaseCirrusSearch (not sure which) now require the experimental highlighter plugin, even if $wgCirrusSearchUseExperimentalHighlighter is not set to true. I don’t know if this is supposed to be autodetected (based on whether the plugin is installed or not) but the detection broke, or if the plugin is supposed to be a hard dependency (like the extra plugin) but nobody remembered to document this.
What should have happened instead?:
There should be search results, or the requirement for the experimental highlighter to be installed should be documented.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
MediaWiki 1.39. I haven’t tested this on a later version; that said, from looking at the getHighlightingConfiguration() methods in WikibaseCirrusSearch’s src/ElasticTermResult.php and src/EntityResultType.php, I get the feeling that the highlighter is still required on the master branch (and the README still doesn’t document this).