private BaseQueryBuilder applyManualWeights(BaseQueryBuilder queryObj, AdvancedQueryPojo.QueryScorePojo score)
{
if ((null != score.tagWeights) || (null != score.typeWeights) || (null != score.sourceWeights)) {
CustomFiltersScoreQueryBuilder manualWeights = QueryBuilders.customFiltersScoreQuery(queryObj);
manualWeights.scoreMode("avg"); // Only tags can match multiple filters, in which case we average them
if (null != score.sourceWeights) {
// Find all weightings with the same score:
ArrayListMultimap<Float, String> invSourceWeights = ArrayListMultimap.create();
for (Map.Entry<String, Double> sourceKeyEl: score.sourceWeights.entrySet()) {