When doing a multimedia search on a wiki we run the search against commonswiki as well, via the $wgCirrusSearchExtraIndexes option. When performing this search though we don't use the template boosts defined on commons which improve the rankings for at least some queries.
This is a bit of a hackish fix, but should be easy to do. Add some configuration variable for manually defining template boosting to use with ExtraIndexes. Add the boosts from commonswiki to that configuration in mediawiki-config and deploy.