Last modified: 2014-10-12 18:22:55 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 T58748, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56748 - API action=wbsearchentities should have an option to return sitelinks too
API action=wbsearchentities should have an option to return sitelinks too
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=backend p=0
: need-volunteer
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-07 23:29 UTC by Yuvi Panda
Modified: 2014-10-12 18:22 UTC (History)
5 users (show)

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


Attachments

Description Yuvi Panda 2013-11-07 23:29:58 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.
Comment 1 Gerrit Notification Bot 2013-11-09 22:32:49 UTC
Change 94585 had a related patch set uploaded by Yuvipanda:
Add sites parameter to API action=wbsearchentities

https://gerrit.wikimedia.org/r/94585
Comment 2 Lydia Pintscher 2014-03-18 10:05:16 UTC
Are you going to work more on this Yuvi?
Comment 3 Yuvi Panda 2014-03-18 10:06:32 UTC
A  bit swamped at the moment, Lydia :( Would be awesome if someone else could rebase the patch and get this in.
Comment 4 John F. Lewis 2014-04-08 23:11:44 UTC
Added to the sprint (technically) - May be worth a developer finishing it off :)
Comment 5 Addshore 2014-05-10 13:37:59 UTC
https://gerrit.wikimedia.org/r/#/c/94585/8
Comment 6 Gerrit Notification Bot 2014-10-03 22:14:20 UTC
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

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


Navigation
Links