Jump to content


From mediawiki.org
Available from version 1.29.0
Allows extensions to add query parser features
Define function:
public static function onCirrusSearchAddQueryFeatures( \CirrusSearch\SearchConfig $config, array &$extraFeatures ) { ... }
Attach hook:
$wgHooks['CirrusSearchAddQueryFeatures'][] = 'MyExtensionHooks::onCirrusSearchAddQueryFeatures';
Called from:File(s): CirrusSearch / Searcher.php

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:CirrusSearchAddQueryFeatures extensions.


  • $config - SearchConfig object which holds current search configuration
  • $extraFeatures - array holding feature objects. This is where the extension should add its features. The feature class should implement \CirrusSearch\Query\KeywordFeature.