Filtering by album does not seem to work

Tags: #<Tag:0x00007fe314d99348>

Hi folks,

Newbie here, so please be kind. :slight_smile:

I can’t seem to get type=album to filter a release-group by album. Here’s an example:

http://musicbrainz.org/ws/2/release-group?artist=65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab&type=album

You’ll see that includes results with the type set to compilation, I only get back results that have a type of ‘compilation’.

http://musicbrainz.org//ws/2/release-group?artist=65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab&type=compilation

I noticed that there is also the primary-type and secondary-type fields, but it’s not clear to me what the expected behavior should be for these queries.

More generally speaking, I’m trying to get a list of official releases (non-compilation and non-bootleg) for a given artist. For example, I’d like a query that returns just the official Pearl Jam albums that are listed under “Albums” here:

Any suggestions?

Thanks in advance!

It works, in that it returns to you all albums (that includes live albums, compilation albums, etc). But that’s not what you want :slight_smile: I’m not sure there’s a great way of doing what you want at the moment, other than just taking the results and filtering out any secondary types you don’t want (you might want live albums but not compilation albums, for example).

3 Likes

Thanks for the response.

I guess this mean that filtering with type=album in the query filters on the primary-type field, and not the type field?

It’s a little confusing because if I set it the type to compilation, it seems to filter on the type field and not the primary-type field (i.e. I get back results with a primary-type of album, but none with a type of album, if that makes sense).

type is an old deprecated thing from when we only had one type per release group. It’s kept for backwards compatibility only, but yeah, searches are over primary and secondary types.

2 Likes