Last modified: 2014-11-12 19:35:56 UTC
When searching for "fooo" with the following query, the api reports an error. https://en.m.wikipedia.org/w/api.php?action=query&format=jsonfm&generator=search&gsrinfo=totalhits%7Csuggestion&gsrlimit=24&gsrnamespace=0&gsroffset=0&gsrprop=redirecttitle&gsrsearch=fooo&gsrwhat=text&list=search&pilimit=24&piprop=thumbnail&pithumbsize=144&ppprop=wikibase_item&prop=pageprops%7Cpageimages&srinfo=suggestion&srlimit=24&srnamespace=0&sroffset=0&srprop=&srsearch=foood&srwhat=text The error: Exception Caught: Internal error in ApiResult::setElement: Attempting to add element suggestion=foo, existing value is foo Context for the query parameters above: apps would like to have option for in-article search. The parameters above are intended to, in a single query, return the results and thumbnail urls and wikibase id's and list results in proper order.
Oops the query is actually this one: https://en.m.wikipedia.org/w/api.php?action=query&format=json&generator=search&gsrinfo=totalhits%7Csuggestion&gsrlimit=24&gsrnamespace=0&gsroffset=0&gsrprop=redirecttitle&gsrsearch=fooo&gsrwhat=text&list=search&pilimit=24&piprop=thumbnail&pithumbsize=144&ppprop=wikibase_item&prop=pageprops%7Cpageimages&srinfo=suggestion&srlimit=24&srnamespace=0&sroffset=0&srprop=&srsearch=fooo&srwhat=text
Change 172794 had a related patch set uploaded by Anomie: API: Don't add searchinfo or interwiki info from generator=search https://gerrit.wikimedia.org/r/172794
As a workaround, pass an empty value for 'gsrinfo'.
Change 172794 merged by jenkins-bot: API: Don't add searchinfo or interwiki info from generator=search https://gerrit.wikimedia.org/r/172794
The fix should be deployed to WMF wikis with 1.25wmf9, see https://www.mediawiki.org/wiki/MediaWiki_1.25/Roadmap for the schedule.