jayvdb added a subscriber: jayvdb.
jayvdb added a project: MediaWiki-API.
jayvdb added a comment.

`SearchPageGenerator` uses API search 
<https://www.mediawiki.org/wiki/API:Search>.

I see File pages from Commons appearing when I search for "file:...", but not 
without file:

https://en.wikipedia.org/w/api.php?action=query&generator=search&gsrsearch=file:Campos%20de%20Cari%C3%B1ena,%20Espa%C3%B1a
https://en.wikipedia.org/w/api.php?action=query&generator=search&gsrsearch=Campos%20de%20Cari%C3%B1ena,%20Espa%C3%B1a

Is "file:..." required to trigger this behaviour, or can it happen other ways?

IMO they should never have been included in the API results by default; the 
caller should have to explicitly request that the API search module includes 
pages which do not (and never have) existed on the wiki.

Any idea what release the API search module started including non-local file 
pages by default?

Pywikibot should definitely have a way to remove these from the generated list 
of search results.

Is it possible to call the API so that these items are not included at all?  I 
looked into the API parameter `interwiki`, which is disabled by default, but 
that looks like it isnt used for these File: pages.

Otherwise Pywikibot probably needs to filter out page records that include the 
`missing` flag.


TASK DETAIL
  https://phabricator.wikimedia.org/T119316

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: jayvdb
Cc: jayvdb, Aklapper, StudiesWorld, binbot, pywikibot-bugs-list, Tgr, Anomie, 
Legoktm



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to