Extension:SphinxSearch/SphinxSearchBeforeQuery

From mediawiki.org
SphinxSearchBeforeQuery
Available from version 0.7.2 (r73342, codereview)
Allow messing with search term and sphinx client before search is executed
Define function:
public static function onSphinxSearchBeforeQuery( &$term, &$cl ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SphinxSearchBeforeQuery": "MediaWiki\\Extension\\MyExtension\\Hooks::onSphinxSearchBeforeQuery"
	}
}
Called from: File(s): SphinxMWSearch.php
Interface: SphinxSearchBeforeQueryHook.php

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


Details[edit]

  • $term: string search term(s)
  • $cl: object SphinxClient