Last modified: 2014-10-12 18:22:55 UTC
We're planning on implementing search in the Wikipedia app based on Wikidata, rather than OpenSearch. As the user types, he gets results based on wbsearchentities, and upon tapping a result, is taken to that particular article on the wiki they have chosen in settings. Current API Call sequence: 1. Call action=wbsearchentities with what I want to search for. 2. Get id of what item I'm interested in 3. Call action=wbgetentities with the id of the item I'm interested in, with parameters sites=<wiki-i-want>&ids=<id-i-want>&props=sitelinks 4. I get back *all* the sitelinks, and I just pick the one I want and ignore the rest 5. I parse the exact article title from the sitelink, and navigate the user to that. This is slow and wasteful. Ideally, 1. Call action=wbsearchentities with search=<term>&language=<lang>&sitelinks=<wikiname> 2. I get results, where the sitelink for the wiki(s?) i specified are also in the results 3. I parse the exact article title from the sitelink, and navigate the user to that. Just one network call, and a lot less data transfer too.
Change 94585 had a related patch set uploaded by Yuvipanda: Add sites parameter to API action=wbsearchentities https://gerrit.wikimedia.org/r/94585
Are you going to work more on this Yuvi?
A bit swamped at the moment, Lydia :( Would be awesome if someone else could rebase the patch and get this in.
Added to the sprint (technically) - May be worth a developer finishing it off :)
https://gerrit.wikimedia.org/r/#/c/94585/8
Change 94585 abandoned by Yuvipanda: Add sites parameter to API action=wbsearchentities Reason: I probably won't have time to spend fixing this anytime soon, and so many rebase conflicts anyway... https://gerrit.wikimedia.org/r/94585