You can double check that the highlighter is in use by dumping the CirrusSearch query. You can ask Mediawiki to do so by adding the &cirrusDumpQuery URI param to the search URL. It will return a JSON page where you can have a look at the elasticsearch query sent by Cirrus.
Under the section "highlight" you'll find the list of fields and type should be set to experimental. If it's not the case then it's probable that $wgCirrusSearchUseExperimentalHighlighter
is not evaluated properly.
If you see type: experimental then you are using the highlighter and unfortunately it's not smart enough to handle your example and the official answer to your question would be no.
You can read the following if you are comfortable with PHP and willing to hack your mediawiki installation.
This highlighter supports a bunch of config options but unfortunately these options are not configurable via MediaWiki config vars.
But if you'd like to hack something everything is in the php file includes/Search/ResultsType.php and more precisely the class FullTextResultsType. You can either try to tweak some scoring values such as boost_before or implement a very ugly hack to only highlight on the field which excludes stop words:
Simply add
if( $name === 'text' ) { continue; }
Inside the loop of the method private function addMatchedFields( $fields ) {
It should look like:
/**
* @param array[] $fields
* @return array[]
*/
private function addMatchedFields( $fields ) {
foreach ( array_keys( $fields ) as $name ) {
if( $name === 'text' ) { continue; } // ugly hack: force highlighting on field with stopwords excluded
$fields[$name]['matched_fields'] = array( $name, "$name.plain" );
}
return $fields;
}