diff --git a/module/VuFind/src/VuFind/Search/Solr/Params.php b/module/VuFind/src/VuFind/Search/Solr/Params.php index e76bc991e39d85dc82029059b5c62bdb590d543f..57b371de6c2cc27385d389d72955bd7ae9eea75e 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Params.php +++ b/module/VuFind/src/VuFind/Search/Solr/Params.php @@ -188,15 +188,7 @@ class Params extends \VuFind\Search\Base\Params if ($this->facetPrefix != null) { $facetSet['prefix'] = $this->facetPrefix; } - if ($this->facetSort != null) { - $facetSet['sort'] = $this->facetSort; - } else { - // No explicit setting? Set one based on the documented Solr behavior - // (index order for limit = -1, count order for limit > 0) - // Later Solr versions may have different defaults than earlier ones, - // so making this explicit ensures consistent behavior. - $facetSet['sort'] = ($this->facetLimit > 0) ? 'count' : 'index'; - } + $facetSet['sort'] = $this->facetSort ?: 'count'; if ($this->indexSortedFacets != null) { foreach ($this->indexSortedFacets as $field) { $facetSet["f.{$field}.facet.sort"] = 'index';