Syntax of (category) searches

Use this forum for HELP at Choral Public Domain Library as well as FEEDBACK
Locked
HDingemans
Posts: 2
Joined: 17 Oct 2021 20:49

Syntax of (category) searches

Post by HDingemans »

I found below query to obtain SAB scores:

https://www.cpdl.org/wiki/index.php?title=Category:SAB

How do I extend the query to limit the results, e.g. only works by composer Byrd, or only Latin language?

If I understand correctly, "categories" are sort of predefined queries, but can these be mixed with "normal" conditions, like:

https://www.cpdl.org/wiki/index.php?tit ... poser=Byrd

In SQL terms, what are the column names and operators (equal, contains, like) that can be used? Any links to the reference material?

Thanks a lot,
~Hans
Claude_T
Moderator
Posts: 579
Joined: 13 Jan 2007 15:16
Location: Fontenay-sous-Bois (France)
Contact:

Re: Syntax of (category) searches

Post by Claude_T »

Hi,
Please, just click on "Multi-category search"
in the left panel of any CPDL page,
it will lead you to https://www.cpdl.org/wiki/index.php/Spe ... ory_Search
HDingemans
Posts: 2
Joined: 17 Oct 2021 20:49

Re: Syntax of (category) searches

Post by HDingemans »

Thanx for pointing me in that direction. I should have specified that I already found the mentioned functionality. However, that only allows to specify "3-part vocal music", and thus I also get SAT, SST, etc.
Given that there is already a (predefined) category "SAB", I wondered if there's a possibility (e.g. by extra arguments in the url?) to further narrow down this result set?

Or can we ourselves define categories, like "Latin William Byrd SAB songs"? If so, where's the manual?

Thanks again!
CHGiffen
Site Admin
Posts: 1749
Joined: 16 Sep 2005 21:22
Location: Hudson, Wisconsin, USA

Re: Syntax of (category) searches

Post by CHGiffen »

Actually, if you click on the "node" (tiny rectangle, not the check box) to the left of "3-part choral music", it expands the tree at this node to list all the various 3-part music subcategories, so you can then check the box for "SAB" choral music.

I ran the query with SAB, Latin, and William Byrd and got 2 results:
Haec dies a 3 (William Byrd)
Mass for Three Voices (William Byrd)

With Sacred music, SAB, and Latin checked, I got 246 results.
Charles H. Giffen
CPDL Board of Directors Chair
Admin at & Manager of ChoralWiki
choralia
Site Admin
Posts: 2848
Joined: 05 Mar 2006 19:57
Location: Rome, Italy
Contact:

Re: Syntax of (category) searches

Post by choralia »

HDingemans wrote: 18 Oct 2021 19:03 Or can we ourselves define categories, like "Latin William Byrd SAB songs"? If so, where's the manual?
ChoralWiki is based on the MediaWiki software, i.e., the same software used by Wikipedia, IMSLP, and many other collaborative websites. The concept behind categories is explained here:

https://www.mediawiki.org/wiki/Help:Categories

Many categories have been defined already at ChoralWiki, so, in most cases, you don't need to create additional categories: you may just look for pages that belong to the categories of interest. The "Multi-category search" is a tool allowing to perform basic queries. However, if you have some programming skills, you can also use the MediaWiki API:

https://www.mediawiki.org/wiki/API:Main_page

The entry point of the CPDL API is located at www.cpdl.org/wiki/api.php, so, for example:

http://www.cpdl.org/wiki/api.php?action ... mlimit=500

provides the list, in JSON format, of all pages that are members of the SAB category, up to a maximum of 500 results.

Max
Locked