Page 1 of 1

Multi-category searches for solo voice

Posted: 20 Nov 2019 00:13
by Richard Mix
http://www.cpdl.org/wiki/index.php/Spec ... ory_Search
has a box that can be checked to search for "solo vocal music" but gives a "No results found" message unless one goes further down (up?) the tree to chose something like "solo voice" or "solo medium". If one choses more than one, one gets not pages with both/all, but combined results, which also seems a bit weird.

Re: Multi-category searches for solo voice

Posted: 21 Nov 2019 13:33
by choralia
Categories in MediaWiki are not hierarchical: a page that is a member of a certain (sub)category (e.g., "solo voice") is not also automatically considered as a member of the parent category (e.g., "solo vocal music"). If a hierarchical behavio(u)r is desired, the page must be tagged as a member of both categories (i.e., of the sub-category as well as of its parent category - and possibly of further parent categories, according to the depth of the hierarchical tree).

The results provided by the Multi-Category Search just reflect that.

Max

Re: Multi-category searches for solo voice

Posted: 21 Nov 2019 23:23
by Richard Mix
I see, but since "solo vocal music" only contains daughter categories like "solo voice" and is never going to give any work pages in a multi-cat search, it seems needlessly confusing to have a checkable box for it.

Re: Multi-category searches for solo voice

Posted: 23 Nov 2019 07:56
by choralia
The form is a Semantic MediaWiki form (now named Page Forms):

https://www.mediawiki.org/wiki/Extension:Page_Forms

governed by this page, which administrators can edit:

https://www.cpdl.org/wiki/index.php/For ... ory_Search

In principle one may remove the parent category and just list the daughter categories: the sintax of the form allows doing that. However, if a new daughter category is added, one should remember to manually add it to the list. Furthermore, if any page in the future is tagged as a member of the parent category, either intentionally or by mistake, it will never result in any Multi-Category searches.

In my opinion, if the real intent is to have hierarchical categories (i.e., any page in a daughter category is also a member of the parent category), the right thing to do is just doing that, by tweaking the templates that automatically associate pages to the corresponding categories.

Max