Page MenuHomePhabricator

Negating deepcategory keyword
Closed, ResolvedPublic


All search-keywords can be prefixed with a - to subtract it's results from the results of the other search parameters (negative). So should deepcategory behave.

Instead currently deepcategory:"foo" -deepcategory:"bar" is a synonym for deepcategory:"foo" deepcategory:"bar" i.e. it searches for articles that are in both categories "bar" and "foo".

Event Timeline

Smalyshev renamed this task from Excluding deepcategory to Negating deepcategory keyword.Apr 28 2018, 7:46 AM
Smalyshev added subscribers: dcausse, Smalyshev.

I suspect this needs more general solution for negating keywords. I thought it should work OOB by filters configuration, but maybe something is wrong there. @dcausse do you know if it's supposed to work?

This is the example I tested: [[ | deepcategory:"Friedhof in Köln" -deepcategory:"Jüdische Trauerhalle in Deutschland" ]] (on dewiki).
It will find only the one page in both categories but none of the categories in all of the first but not the second category (should return 20 results).

Indeed there seem to be a weird bug, searching for deepcat:"Friedhof in Köln" -deepcat:"Jüdische Trauerhalle in Deutschland" works properly.
deepcategory is an alias to deepcat so I bet there is something weird going on with negation and keyword aliases.
I'll look into it. Thanks!

dcausse triaged this task as Medium priority.

Change 429844 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/CirrusSearch@master] Keyword aliases should support negation

Change 429844 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Keyword aliases should support negation

Vvjjkkii renamed this task from Negating deepcategory keyword to f4daaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed dcausse as the assignee of this task.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from f4daaaaaaa to Negating deepcategory keyword.Jul 2 2018, 3:06 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to dcausse.
CommunityTechBot lowered the priority of this task from High to Medium.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.