lib/gummi/repository_layer/repository/result.rb in gummi-0.3.9 vs lib/gummi/repository_layer/repository/result.rb in gummi-0.3.10

- old
+ new

@@ -16,11 +16,16 @@ def facets return unless search_result.facets @facets ||= begin result = {} search_result.facets.each do |(name, content)| - result[name] = Hash[content.terms.map(&:values)] + case content['_type'] + when 'terms' + result[name] = Hash[content.terms.map(&:values)] + when 'statistical' + result[name] = Hash[content.map(&:values)] + end end Hashie::Mash.new result end end @@ -49,6 +54,6 @@ attr_reader :search_result, :converter, :documents end end end -end \ No newline at end of file +end