Page MenuHomePhabricator

-file and -search does not work together since yesterday
Closed, InvalidPublic

Description

On any script (including my own) these two does not work together since yesterday. I tried many combinations of python pwb.py script -file:"articles_that_need_template.txt" -search:"-insource:/\{\{template/i", but none of them works, every time the script operates on articles even if the template is inside and ignores CirrusSearch's insource at all. It also stopped working on older versions of Pywikibot (where it clearly worked before). It looks like the problem is somewhere in between. CirrusSearch on WIkipedia works as expected too. Maybe some bug/latest change of behavior in MW API? Or some error on MW servers?

Note: I always use the newest code from Gerrit (using git pull --all)
Note: CirrusSearch hastemplate doesn't work too, but it is caused maybe by some other bug (see T155292)

Example. This code should not do anything, because I try on a list of articles to change word kategorie to word whatever, but also I exclude articles containing the word kategorie:

Snímek z 2017-01-14 10-32-55.png (462×734 px, 82 KB)

Event Timeline

Dvorapa triaged this task as Unbreak Now! priority.Jan 14 2017, 9:08 AM
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)
Anomie subscribed.

There does not seem to be anything here for MediaWiki-Action-API. If you identify actual queries to api.php that are not behaving as expected due to errors in the API, rather than vague issues that might be in pywikibot or CirrusSearch, feel free to re-add. As it stands, this report does not identify any API queries at all.

There does not seem to be anything here for MediaWiki-Action-API. If you identify actual queries to api.php that are not behaving as expected due to errors in the API, rather than vague issues that might be in pywikibot or CirrusSearch, feel free to re-add. As it stands, this report does not identify any API queries at all.

It does not, because I don't know exactly, how the communication between pwb and API works, but this is not an issue of pwb and it looks like it is not an issue in CirrusSearch, therefore it has 80 % probability to be caused by API

As I said, if you believe it's in the API then show me API queries that are not doing what they're supposed to be doing rather than quoting some random pywikibot script. Without that there's nothing I can do here.

debt subscribed.

Looks like this is for Pywikibot to fix, removing Discovery.

JJMC89 lowered the priority of this task from Unbreak Now! to Needs Triage.Jan 19 2017, 11:37 PM

This behavior is correct as far as I can see. If you provide multiple generators (-file and -search), it will work on the pages from the first one, after exhausting the second one and so on. Adding -intersect to the command line should solve this.

Yes, I forgot -intersect, thank you.