Last modified: 2012-12-13 19:35:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18572, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16572 - Search via API fails intermittently
Search via API fails intermittently
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.14.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-05 20:53 UTC by Russell Blau
Modified: 2012-12-13 19:35 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Russell Blau 2008-12-05 20:53:10 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.
Comment 1 Roan Kattouw 2008-12-05 21:05:58 UTC
(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.
Comment 2 Robert Stojnic 2008-12-05 21:15:29 UTC
There might be some timing out happening on the backend. Will investigate. 
Comment 3 Peter Bena 2011-11-23 20:19:55 UTC
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"
	}
}
Comment 4 travdahl 2012-12-13 19:35:32 UTC
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"
  }
}

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links