Class: Sunspot::Query::StandardQuery

Inherits:
CommonQuery show all
Defined in:
lib/sunspot/query/standard_query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CommonQuery

#[], #add_field_facet, #add_function, #add_query_facet, #add_sort, #page, #paginate, #per_page, #solr_parameter_adjustment=, #to_params

Constructor Details

#initialize(types) ⇒ StandardQuery

Returns a new instance of StandardQuery.


6
7
8
9
# File 'lib/sunspot/query/standard_query.rb', line 6

def initialize(types)
  super
  @components << @fulltext = CompositeFulltext.new
end

Instance Attribute Details

#fulltextObject

Returns the value of attribute fulltext


4
5
6
# File 'lib/sunspot/query/standard_query.rb', line 4

def fulltext
  @fulltext
end

#scopeObject

Returns the value of attribute scope


4
5
6
# File 'lib/sunspot/query/standard_query.rb', line 4

def scope
  @scope
end

Instance Method Details

#add_fulltext(keywords) ⇒ Object


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

def add_fulltext(keywords)
  @fulltext.add(keywords)
end

#add_location_restriction(coordinates, radius) ⇒ Object


15
16
17
# File 'lib/sunspot/query/standard_query.rb', line 15

def add_location_restriction(coordinates, radius)
  @components << @local = Local.new(coordinates, radius)
end