Page MenuHomePhabricator

Provide a form of incategory: which covers subcategories as well
Closed, DuplicatePublic

Description

As a Wikipedia user I want the category search results to give me results for the searched category and its subcategories automatically.

See https://de.wikipedia.org/wiki/Wikipedia:Umfragen/Technische_Wünsche/Top_20#.E2.80.9ECatScan-Funktionalit.C3.A4t.E2.80.9C_in_die_Software_integrieren (in German).

This is part of the Top 20 wishes of the German community

Author: rd232

Description:
It's currently possible to search incategory:X or -incategory:X, where X is a category name, to include or exclude results categorised in Category:X. However, this does not cover subcategories. This would obviously be useful, particularly on Commons where search is an important way to find media.

This could be a separate keyword, say incategorysub:X. We could also, in addition, extend incategory to specify recursion levels, with incategory:X defaulting to incategory:0:X (just the category specified - no recursion), and incategory:5:X meaning that we want to traverse 5 levels deep, and perhaps incategory:-1:X meaning the same as incategorysub:X.

Obviously, the usefulness of this feature would be enhanced by also addressing T143310 (basically, providing GUI access to advanced search features).


Version: unspecified
Severity: enhancement

Details

Reference
bz35402

Related Objects

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 12:10 AM
bzimport added a project: CirrusSearch.
bzimport set Reference to bz35402.
bzimport added a subscriber: Unknown Object (MLST).

rd232 wrote:

Well it's been a year. Is there any sign of ... anything?

If you ever tried to code a similar function, you will understand the flexible structure of mediawiki category makes it difficulty to implement.

One category can have multiple subcategories, and there may have a loop in a category tree(subsubsubcategory of a parent category may be the parent category).

As long as categories of mediawiki remain flexible, I belive this function will not be implemented in the near future.

Moving this feature request to CirrusSearch queue to be reassessed at a future date.

See also https://commons.wikimedia.org/wiki/Help:FastCCI which can do this (implemented as a separate program)

*** Bug 54643 has been marked as a duplicate of this bug. ***

KasiaWMDE raised the priority of this task from Lowest to Medium.Jun 2 2015, 12:20 PM
KasiaWMDE updated the task description. (Show Details)
KasiaWMDE added a subscriber: Tobi_WMDE_SW.

There's no assignee but 2 workboards have this in column "Work in progress".

Please clarify @KasiaWMDE.

@jeremyb-phone Thanks for pointing that out and sorry for the confusion. We have been indeed working on it and the task is claimed now.

@KasiaWMDE Can you link to the patch that completed this task, so that it is documented here? Thanks!

@Deskana We have developed a gadget that enables recursive search but it still has some serious constraints: limits regarding the number of searched categories. We are planning to raise them for next version of the gadget (see T105695). There is no specific patch for the gadget but here is the link to Github https://github.com/wmde/DeepCat-Gadget

This comment was removed by Cpiral.

The gadget is now at 70 categories, automatically producing incategory:pagename1|pagename2|...|pagename70 for us. Thanks!
I assume this is the desired level for the gadget, 70 (raised from 50).

Also, does this SQL-related gadget complete this task? Or does the "up for grabs" status imply that there is a plan for some sort of NOSQL-related insubcategory:?

@Cpiral Basically this task is done since the DeepCat-Gadget provides the functionality of searching in subcategories. However there's still the fact that the functionality of the gadget is quite limited, main blocker for raising the limits even more is T105328.

As for your question about Catgraph: DeepCat is backed by Catgraph, for more information on this, see here.

I think this task isn't really done, because CatGraph does only work in Wikimedia projects as far as I know, an use of this gadgetin other projects isn't possible in a simple way. I think that this task will finally be resolved without need of a gadget if T4725 is done, because it would be really simple to implement if such a functionality is given.

@Liuxinyu970226: This was mentioned as a related task on the 2016 Community Wishlist. This task is not an item on the 2016 Community Wishlist.