return NULL;
} // Add conditions to the query.
$this->
join('search_dataset', 'd', '[i].[sid] = [d].[sid] AND [i].[type] = [d].[type] AND [i].[langcode] = [d].[langcode]'
);
if (count($this->conditions
)) { $this->
condition($this->conditions
);
} // Add default score (keyword relevance) if there are not any defined.
if (empty($this->scores
)) { $this->
addScore('i.relevance'
);
} if (count($this->multiply
)) { // Re-normalize scores with multipliers by dividing by the total of all
// multipliers. The expressions were altered in addScore(), so here just
// add the arguments for the total.
$sum =
array_sum($this->multiply
);
for ($i = 0;
$i <
count($this->multiply
);
$i++
) { $this->scoresArguments
[':total_' .
$i] =
$sum;
} }