Template talk:Search inside category

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Does not search subcategories

[edit]

It's really great to have a search box for categories so this is a great concept and probably these search boxes should be added to all category pages by default at some point.

However, currently search boxes of this template are essentially useless in most or nearly all cases: they only search files directly in a category but notin subcategories.

This could be fixed by using the deepcategory operator instead of the incategory one. The problem is that it doesn't work for most categories.
For example, when running a search in Category:Sports, a prominent large category where this template is included, and then changing the resulting query to deepcategory it returns "A warning has occurred while searching: Deep category search timed out. Most likely the category has too many subcategories".
It also does not work for some small categories (few subcategories and files) without displaying this error (example).

Have there been previous proposals, discussions and code issues about this? Could somebody please fix that? It would enable proper useful category search boxes and make the categories much more useful and files more easily found. I have create the code issue on the right. Prototyperspective (talk) 12:21, 11 July 2024 (UTC)[reply]