public function SearchApiDbTest::facetCompare in Search API Database Search 7
Compares two facets for ordering.
Used as a callback for usort() in checkFacets() and regressionTests().
File
- ./
search_api_db.test, line 925
Class
- SearchApiDbTest
- Class for testing index and search capabilities using the Database search module.
Code
public function facetCompare($a, $b) {
if ($a['count'] != $b['count']) {
return $b['count'] - $a['count'];
}
return strcasecmp($a['filter'], $b['filter']);
}