Ranking music track results higher if they appear on the same album

My index currently stores music tracks.

A track object contains all track metadata, including an album object with album metadata.

Is there a way to configure the index so it returns track results higher if multiple matching tracks appear on the same album?

I don’t know if this could only be achieved by changing the way the index is structured (i.e. with album objects full of tracks, rather than track objects holding album metadata).

Right now the index is configured to return distinct album ids, but that’s obviously based on the most relevant track, which may be the only relevant track on an album.