Page MenuHomePhabricator

Feature request: boolean search in categories
Closed, ResolvedPublic

Description

Author: wiki_tomos

Description:
I would like to request a feature to generate lists based on two or more
categories.

That is, for example,

*{{List: Category:Albania AND Category:Business}} results in a list of pages in
the both category at the same time.
*{{List: Category:Albania OR Category:Belgium}} results in a list of pages in at
least either of Albania or Belgium.
*{{List: Category:Albania NOT Category:Bosnia}} results in a list of pages in A
but not in B.

This is helpful in order to index and re-organize Wikinews, where inter-article
linking is not as prevalent as Wikipedia or some others, but need to organize
article in multiple ways to cater to the readers' interests, as well as writers'.

This feature could produce a heavy load to the server if the following is allowed.
*{{List: NOT Category:Albania NOT Category:Bosnia}} which means a list of all
pages neither of A or B (potentially a huge list). So the feature should not
allow NOT at the beginning.

Another is to limit the number of categories dealt within one request. {{List:
Category:A OR Category:B OR Category:C OR Category:D OR .....}} I don't know
where the limit should be placed, but 4 would be reasonable.

A nice extension is to be able to define the order of calculations.

For example,

*{{List: Category:2004 AND (Category:Sports OR Category:Entertainment)}}
or
*{{List: Category:2004 AND {{List: Category:Sports OR Category:Entertainment}}}}

resulting in the list of pages in (1) either sports OR entertainment AND (2)
also in 2004.

Finally, I suppose it is useful even when it is not dynamically generated. So
when someone use {{List: Category:Politics and conflicts AND
Category:Unreviewed}} it could be replaced by the list at that moment, as
opposed to generate the list everytime the page is viewed by someone.


Version: unspecified
Severity: enhancement

Details

Reference
bz1106
ReferenceSource BranchDest BranchAuthorTitle
repos/data-engineering/metrics-platform!7work/phuedx/T310693mainphuedx[JS][Java] Mix in sample unit and rate
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 8:06 PM
bzimport set Reference to bz1106.
bzimport added a subscriber: Unknown Object (MLST).

wiki_tomos wrote:

Now a version of this feature is submitted at #1411.

Wiki.Melancholie wrote:

Maybe "CatScan" can help you a little bit:
http://tools.wikimedia.de/~daniel/WikiSense/CategoryIntersect.php?
wikilang=en&wikifam=.wikinews.
org&basecat=2005&tagcat=Sports&userlang=en

dbenbenn wrote:

This feature would help Wikipedia, too. With the current system, we have to
decide on a particular, arbitrary, category structure. For example,
[[Category:American people]] is subcategorized in a very ad hoc way. Also,
[[Category:Nationalities by occupation]] and [[Category:Occupations by
nationality]] are simply two different ways of intersecting [[Category:People by
occupation]] and [[Category:People by nationality]].

If we had a really good way to automatically generate category intersections,
then we could dramatically simplify the category structure on the English Wikipedia.

peu wrote:

(in response to #3)
The category usage would change (to ab better one) too.
Marked as duplicate of #5244

*** This bug has been marked as a duplicate of 5244 ***