class Sunspot::Query::Restriction::EqualTo

Results must have field with value equal to given value. If the value is nil, results must have no value for the given field.

Public Instance Methods

negated?() click to toggle source
# File lib/sunspot/query/restriction.rb, line 185
def negated?
  if @value.nil?
    !super
  else
    super
  end
end
to_positive_boolean_phrase() click to toggle source
# File lib/sunspot/query/restriction.rb, line 177
def to_positive_boolean_phrase
  unless @value.nil?
    super
  else
    "#{Util.escape(@field.indexed_name)}:[* TO *]"
  end
end