Repository navigation
Conversation
Search fields discarded duplicates before summing. A release with two three-track mediums was indexed with a total of three tracks, so a search for six tracks missed it. Keep repeated values when summing release tracks and area references. Other fields still deduplicate values in the order they are read. Convert UUIDs to strings during collection so artist ID fields can use the same logic. Cover both deduplication modes and verify that a release with two three-track mediums is indexed with six tracks. Co-authored-by: junaid <shaikjunaid323@gmail.com>
| F("status", "status.name"), | ||
| F("tracks", "mediums.track_count", | ||
| transformfunc=sum), | ||
| transformfunc=sum, distinct=False), |
There was a problem hiding this comment.
tracksrelease on SearchRecording also uses transformfunc=sum, I guess that has the same issue?
There was a problem hiding this comment.
Actually I'm not sure if/how tracksrelease works. The docs say it's "the number of tracks on any release (as a whole) including this recording," but that doesn't seem to be the same thing as summing tracks.medium.release.mediums.track_count, unless that groups by release before summing mediums.track_count. Edit: Anyway, that might be a separate issue from SEARCH-758.
| F("iso3", "iso_3166_3_codes.code"), | ||
| F("sortname", "aliases.sort_name"), | ||
| F("ref_count", ["place_count", "label_count", "artist_count"], transformfunc=tfs.integer_sum, trigger=False), | ||
| F("ref_count", ["place_count", "label_count", "artist_count"], transformfunc=tfs.integer_sum, trigger=False, |
There was a problem hiding this comment.
There's a ref_count field on SearchArtist too, is that not affected?
There was a problem hiding this comment.
I think its not affected because ref_count in SearchArtist depends on a single integer field artist_credit_names.artist_credit.ref_count.
There was a problem hiding this comment.
Hmm, but isn't that summing every ref_count for every artist credit the artist appears on? If two of those credits have the same ref_count, my understanding is that only one of the ref counts would be counted.
| # `[none]` type barcode via the syntax `barcode:none` | ||
| if "" in values: | ||
| return values.add('none') | ||
| return values.append('none') |
There was a problem hiding this comment.
I was confused why we'd want to append none multiple times, but I guess it's just because values is a list now.
But I also couldn't find none documented on the wiki, and it seems to not actually work? https://musicbrainz.org/ws/2/release/?query=barcode:none
mwiencek
left a comment
There was a problem hiding this comment.
This looks correct except for, possibly, fixing the other ref_count field. The other two issues are probably separate tickets.
Search fields discarded duplicates before summing. A release with two three-track mediums was indexed with a total of three tracks, so a search for six tracks missed it.
Keep repeated values when summing release tracks and area references. Other fields still deduplicate values in the order they are read. Convert UUIDs to strings during collection so artist ID fields can use the same logic.
Cover both deduplication modes and verify that a release with two three-track mediums is indexed with six tracks.