Page MenuHomePhabricator

AdvancedSearch should end the current request when redirecting the namespaced search URL
Closed, ResolvedPublic


As a maintainer of CirrusSearch I would like to only send search requests to elastic the ones whose results are actually displayed to the user so that backend logs are more meaningful and the cluster resources are used more efficiently.

The extension uses the SpecialPageBeforeExecute hook to redirect from /index.php?search=~search+query&title=Special:Search&go=Go to /index.php?search=~search+query&title=Special:Search&go=Go&ns0=1 (to add the ns0=1 param).

The SpecialPageBeforeExecute hook should return false in this case to abort execution of the SpecialSearch page otherwise the search query is being processed twice by the backend but only displayed once.


  • when entering Special:Search from the autocomplete search box the search request (nearmatch + fulltext) is only performed once before I see the search results.