lib/thinking_sphinx/search.rb in friendlyfashion-thinking-sphinx-2.0.14.1 vs lib/thinking_sphinx/search.rb in friendlyfashion-thinking-sphinx-2.0.14.2
- old
+ new
@@ -669,10 +669,11 @@
def conditions_as_query
return '' if @options[:conditions].blank?
' ' + @options[:conditions].keys.collect { |key|
- "@#{key} #{options[:conditions][key]}"
+ search_key = key.is_a?(::Array) ? "(#{key.join(',')})" : key
+ "@#{search_key} #{options[:conditions][key]}"
}.join(' ')
end
def star_query(query)
token = options[:star].is_a?(Regexp) ? options[:star] : default_star_token