lib/blacklight/solr/facet_paginator.rb in blacklight-7.16.0 vs lib/blacklight/solr/facet_paginator.rb in blacklight-7.17.0
- old
+ new
@@ -18,9 +18,11 @@
# :offset => current item offset, default 0
# :sort => 'count' or 'index', solr tokens for facet value sorting, default 'count'.
def initialize(all_facet_values, arguments = {})
super
+ @sort = arguments[:sort].keys.first.to_s if arguments[:sort].is_a? Hash
+
# count is solr's default
@sort ||= if @limit.to_i > 0
'count'
else
'index'