Last modified: 2010-07-09 11:08:36 UTC
There should be a way in the API to tell which page you'll be redirected to when you type a certain string in the search box and click "Go". It's possible to get this by requesting http://en.wikipedia.org/w/index.php?title=Special%3ASearch&search=something&go=Go and getting the target of the resulting HTTP 302, but this'll return an HTTP 200 with search results when there is no title match for 'something' and this is hacky. The API should have some way of requesting this so it'll be cleaner and not run a full-blown search with the associated bandwidth usage if there is no title match.
Done in r64436.
r69202
Created attachment 7559 [details] Patch as part of list=search I needed to change the constructor of SearchResult to get this working. Any objections to this?
(In reply to comment #3) > I needed to change the constructor of SearchResult to get this working. Any > objections to this? You could probably make a static function newFromTitle(), instead of comparing types in constructor.
r69203