To make it work you have make monkey patch Sunspot::Query::Restriction::EqualTo
method. Create a new file in config/initializers directory and add this code:
module Sunspot
module Query
module Restriction
class EqualTo < Base
def to_positive_boolean_phrase
case @value
when nil
"#{escape(@field.indexed_name)}:[* TO *]"
when ''
%Q(#{escape(@field.indexed_name)}:[* TO ""])
else
super
end
end
def negated?
if @value.nil?
!super
else
super
end
end
private
def to_solr_conditional
"#{solr_value}"
end
end
end
end
end
Remember to restart rails server before you try this.