# File lib/thinking_sphinx/facet_search.rb, line 114 def initialize(facets, hash) @facets, @hash = facets, hash end
# File lib/thinking_sphinx/facet_search.rb, line 118 def to_hash @hash.keys.inject({}) { |options, key| type = @facets.detect { |facet| facet.name == key.to_s }.filter_type options[type] ||= {} options[type][key] = @hash[key] options } end