Extension:CirrusSearch/Hooks/CirrusSearchScoreBuilder
Appearance
(Redirected from Manual:Hooks/CirrusSearchScoreBuilder)
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
[edit]- $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.