Anomie added a subscriber: Anomie.
Anomie added a comment.

In https://phabricator.wikimedia.org/T119316#1865521, @jayvdb wrote:

> `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?


Add `gsrnamespace=6`, or a list of namespaces including 6.

> 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.

action=search is intended to work equivalently to Special:Search. And the 
search //result// does exist on the wiki, thanks to the way shared files work.

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

Probably due to the CirrusSearch extension.


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

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

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



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

Reply via email to