Page MenuHomePhabricator

API returning unnecessary continuations in generator results
Closed, InvalidPublic

Description

This generator query that restricts to the File namespace on Commons should give 7 results, since there are currently 7 files in the category. However it's instead giving 0 results and a continuation. It seems like it's iterating the full contents of the category, including its 82 subcategories, when only the files should be iterated.

https://commons.wikimedia.org/w/api.php?format=json&generator=categorymembers&action=query&gcmtitle=Category:Cat%20breeds&gcmlimit=10&gcmnamespace=6

Event Timeline

Ghouston created this task.Apr 3 2016, 6:49 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 3 2016, 6:49 AM
Ghouston renamed this task from API ignoring namespace restriction in generator results to API returning unnecessary continuations in generator results.Apr 3 2016, 7:17 AM
Anomie closed this task as Invalid.Apr 3 2016, 1:55 PM
Anomie added a subscriber: Anomie.

This is intentional, due to miser mode, and is noted in the auto-generated documentation for the cmnamespace parameter. Also noted there is that you can use cmtype=file to fetch only files rather than using cmnamespace=6, and this does not have issues with miser mode.