Class: Sunspot::Search::FieldGroup
- Inherits:
-
Object
- Object
- Sunspot::Search::FieldGroup
- Defined in:
- lib/sunspot/search/field_group.rb
Instance Method Summary collapse
- #groups ⇒ Object
-
#initialize(field, search, options) ⇒ FieldGroup
constructor
:nodoc:.
- #matches ⇒ Object
Constructor Details
#initialize(field, search, options) ⇒ FieldGroup
:nodoc:
4 5 6 |
# File 'lib/sunspot/search/field_group.rb', line 4 def initialize(field, search, ) #:nodoc: @field, @search, @options = field, search, end |
Instance Method Details
#groups ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/sunspot/search/field_group.rb', line 8 def groups @groups ||= begin if solr_response solr_response['groups'].map do |group| Group.new(group['groupValue'], group['doclist'], @search) end end end end |
#matches ⇒ Object
19 20 21 22 23 |
# File 'lib/sunspot/search/field_group.rb', line 19 def matches if solr_response solr_response['matches'].to_i end end |