Extension:CirrusSearch/Hooks/CirrusSearchAddQueryFeatures

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
CirrusSearchAddQueryFeatures
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.

Details

  • $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.