Looking at it from behavioral/contextual point of view, your example of W3Schools works well keeping the context in that it's fetching results from an external site. That is very transitory and well suited in case of W3Schools sites. The behavioral attribute very well defines that it's temporary and the user acknowledges the by-pass.
If you juxtapose this case with a site with Search integrated to bring results from the own site (locally), then the transitory Model looks like you are temporarily detached from the Site. IMHO this solution provides a feeling of a "lost-focus" approach or "losing-your compass/bearing".
Assuming it's a non-simple Search – if your search is either scoped or faceted – then it adds more complexity to have a modal dialog to handle these functionalities.
Looking at the context of outbound Search (in the case that it's external), I advise you to use a Modal dialog, but otherwise it may not be a good choice. A flyout panel or a dynamic segment under the Search may alternatively be similar or closer choices alternative to a "mundane" SERP loaded in a new page if the time taken to load is high (though I feel this will not be a constraint in your case).