Manual:$wgSearchForwardUrl

Details
Set this to a URL to forward search requests to some external location. If the URL includes ' ', this will be replaced with the URL-encoded search term. For example, to forward to Google you'd have something like:

You also need to set or $wgSearchForwardUrl is ignored.