Commit 5e361b54 authored by marthinal's avatar marthinal Committed by borisson_
Browse files

Issue #2693861 by marthinal: Fix core search tests with postgres

parent 7f41ea75
......@@ -91,11 +91,11 @@ class FacetsQuery extends SearchQuery {
// Adds subquery to group the results in the r table.
$subquery = db_select($this->query, 'r')
->fields('r', array('value'))
->orderBy('count', 'DESC');
// Adds COUNT() expression to get facet counts.
$subquery->addExpression('COUNT(r.value)', 'count');
$subquery->orderBy('count', 'DESC');
// Executes the subquery.
return $subquery->execute();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment