class Sunspot::Query::StandardQuery

Attributes

fulltext[RW]
scope[RW]

Public Class Methods

new(types) click to toggle source
Calls superclass method Sunspot::Query::CommonQuery::new
# File lib/sunspot/query/standard_query.rb, line 6
def initialize(types)
  super
  @components << @fulltext = Conjunction.new
end

Public Instance Methods

add_fulltext(keywords) click to toggle source
# File lib/sunspot/query/standard_query.rb, line 11
def add_fulltext(keywords)
  @fulltext.add_fulltext(keywords)
end
add_join(keywords, target, from, to) click to toggle source
# File lib/sunspot/query/standard_query.rb, line 15
def add_join(keywords, target, from, to)
  @fulltext.add_join(keywords, target, from, to)
end
conjunction() { || ... } click to toggle source
# File lib/sunspot/query/standard_query.rb, line 28
def conjunction
  parent_fulltext = @fulltext
  @fulltext = @fulltext.add_conjunction

  yield
ensure
  @fulltext = parent_fulltext
end
disjunction() { || ... } click to toggle source
# File lib/sunspot/query/standard_query.rb, line 19
def disjunction
  parent_fulltext = @fulltext
  @fulltext = @fulltext.add_disjunction

  yield
ensure
  @fulltext = parent_fulltext
end