Page MenuHomePhabricator

Allow &continue= in wbsearchentities when there are more than 50 results
Open, Needs TriagePublic

Description

See https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/c7a5408f6bcd7a51ac82d06a5f3f2206b557ea25/repo/includes/Api/SearchEntities.php#265


Original:

At the moment the wbsearchentities-API does not support the mediawiki-continue:

https://wikidata.org/w/api.php?format=xml&action=wbsearchentities&search=Daniel&language=de&limit=7&continue=

will return 7 entries and no continue-code (there are up to 12 entries for this query). While is it no problem here (because I could raise the limit to 50), there is a problem as soon as there are more than 50 entries.

Event Timeline

DaBPunkt created this task.Jul 29 2016, 1:39 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptJul 29 2016, 1:39 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Addshore closed this task as Invalid.Jul 31 2016, 8:14 PM
Addshore added a subscriber: Addshore.

The following will work / has been implemented for a while

https://wikidata.org/w/api.php?format=xml&action=wbsearchentities&search=Daniel&language=de&limit=7&continue=7

The response has a "search-continue" element which can be passed back to get the next bit of the list.

Change 302138 had a related patch set uploaded (by Addshore):
Add wbsearchentities example with continue param

https://gerrit.wikimedia.org/r/302138

DaBPunkt reopened this task as Open.Aug 3 2016, 1:37 PM

mm, but the search-continue-attribute is only working until you reach the limit of 50.

For example

https://www.wikidata.org/w/api.php?format=xml&action=wbsearchentities&search=M%C3%BCller&language=de&limit=5&continue=45

returns the attribute but

https://www.wikidata.org/w/api.php?format=xml&action=wbsearchentities&search=M%C3%BCller&language=de&limit=5&continue=50

does not. While I can increase the continue-parameter AFAIS, the API does not return the attribute anymore.

Change 302138 merged by jenkins-bot:
Add wbsearchentities example with continue param

https://gerrit.wikimedia.org/r/302138

Bugreporter renamed this task from Allow &continue= in wbsearchentities to Allow &continue= in wbsearchentities when there are more than 50 results.Aug 20 2020, 8:12 PM
Bugreporter updated the task description. (Show Details)
Bugreporter added a subscriber: SJu.