Last modified: 2012-12-13 19:35:32 UTC
I submitted the search query in the URL field of this report 3 times; the first two times I got an API error message, while the third time I got an (apparently) valid search result. The error message received was: "error": { "code": "srsearch--disabled", "info": " search is disabled", } Evidently the API is receiving an incorrect error code, intermittently, from some backend module. I have no way of identifying what causes the search to succeed some times and fail others, but I can confirm that I used the identical URL each time.
(In reply to comment #0) > I submitted the search query in the URL field of this report 3 times; the first > two times I got an API error message, while the third time I got an > (apparently) valid search result. The error message received was: > > "error": { > "code": "srsearch--disabled", > "info": " search is disabled", > } > The error code the API returns here is invalid, but that was fixed recently (see bug 16548). > Evidently the API is receiving an incorrect error code, intermittently, from > some backend module. I have no way of identifying what causes the search to > succeed some times and fail others, but I can confirm that I used the identical > URL each time. > What's happening here is that the SearchEngine::searchTitle() and SearchEngine::searchText() functions return null. The API interprets this as "this search type is disabled" (since r32349; is this assumption even correct?) and throws the associated error. If srwhat isn't set (which is the case in your request), both functions (first title, then text) will be tried, and if both return null, you'd get the srsearch--disabled error before bug 16548 was fixed, and srsearch-text-disabled after.
There might be some timing out happening on the backend. Will investigate.
FYI: this bug is still happening on current 1.18wmf1, I will do some more tests and try to find out what's causing it way to reproduce it: Open link http://en.wikipedia.org/w/api.php?action=query&list=search&srnamespace=5|6|7&srsearch=word&srlimit=5&format=jsonfm and refresh it like 10 times, it should appear then. example: { "servedby": "mw74", "error": { "code": "srsearch-text-disabled", "info": "text search is disabled" } }
This is happening right now for me... http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=balboa%20park%20san%20diego&srlimit=10&srprop=snippet&format=json { "servedby": "srv216", "error": { "code": "srsearch-text-disabled", "info": "text search is disabled" } }