< Extension:CirrusSearch < Hooks 
 
      | CirrusSearchScoreBuilder | |
|---|---|
| Available from version 1.29.0 Allows extensions to define rescore builder functions | |
| Define function: | public static function onCirrusSearchScoreBuilder( array $func, \CirrusSearch\Search\SearchContext $context, &$builder ) { ... }
 | 
| Attach hook: | $wgHooks['CirrusSearchScoreBuilder'][] = 'MyExtensionHooks::onCirrusSearchScoreBuilder';
 | 
| Called from: | File(s): CirrusSearch / includes/Search/RescoreBuilders.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of other extensions using this hook, see Category:CirrusSearchScoreBuilder extensions.
Details
- $func - function definition map, with keys:
- type - function name
- weight - weight of this function in this specific profile
- For other parameter examples, see RescoreProfiles.config.php
 
- $context - SearchContext object
- $builder - object implementing the function. Should be placed in this variable if this extension has it.
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.