Sha256: 7772bf03b56421a51bf300cf606cd337d80e55d9b84cc1aaa97537234a0576fb
Contents?: true
Size: 674 Bytes
Versions: 9
Compression:
Stored size: 674 Bytes
Contents
module Sunspot module Search class FieldGroup def initialize(field, search, options) #:nodoc: @field, @search, @options = field, search, options end def groups @groups ||= begin if solr_response solr_response['groups'].map do |group| Group.new(group['groupValue'], group['doclist'], @search) end end end end def matches if solr_response solr_response['matches'].to_i end end private def solr_response @search.group_response[@field.indexed_name.to_s] end end end end
Version data entries
9 entries across 9 versions & 3 rubygems