https://bugzilla.wikimedia.org/show_bug.cgi?id=56748

       Web browser: ---
            Bug ID: 56748
           Summary: API action=wbsearchentities should have an option to
                    return sitelinks too
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: WikidataRepo
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to