Class: Sunspot::Query::GroupQuery

Inherits:
Connective::Conjunction show all
Defined in:
lib/sunspot/query/group_query.rb

Overview

Representation of a GroupQuery, which allows the searcher to specify a query to group matching documents. This is essentially a conjunction, with an extra instance variable containing the label for the group.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Connective::Conjunction

#add_conjunction, inverse

Methods inherited from Connective::Abstract

#add_component, #add_conjunction, #add_disjunction, #add_negated_restriction, #add_negated_shorthand_restriction, #add_positive_restriction, #add_positive_shorthand_restriction, #add_restriction, #add_shorthand_restriction, #negate, #negated?, #to_boolean_phrase

Methods included from Filter

#tag, #to_filter_query

Constructor Details

#initialize(label, negated = false) ⇒ GroupQuery

Returns a new instance of GroupQuery.



11
12
13
14
# File 'lib/sunspot/query/group_query.rb', line 11

def initialize(label, negated = false)
  super(negated)
  @label = label
end

Instance Attribute Details

#labelObject (readonly)

:nodoc:



9
10
11
# File 'lib/sunspot/query/group_query.rb', line 9

def label
  @label
end