Page 1 of 1

Syntax of (category) searches

Posted: 17 Oct 2021 21:49
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

Re: Syntax of (category) searches

Posted: 18 Oct 2021 06:47
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

Re: Syntax of (category) searches

Posted: 18 Oct 2021 19:03
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!

Re: Syntax of (category) searches

Posted: 19 Oct 2021 06:31
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.

Re: Syntax of (category) searches

Posted: 19 Oct 2021 19:13
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