lib/ambition/adapters/ambitious_sphinx/select.rb
# Handles generating an Ultrasphinx query for code like:
#
#   u.name !~ 'bob'
#
# Some cavaets:
#  * left hand side _must_ be a field, like u.name
#  * right hand side _must not_ be a regular expression. Pattern matching is generally not
#    supported by full text search engines
Handles generating an Ultrasphinx query for code like:
u.name !~ 'bob'

Some cavaets:
left hand side _must_ be a field, like u.name
right hand side _must not_ be a regular expression. Pattern matching is generally not
supported by full text search engines
Handles generating an Ultrasphinx query for code like : u . name !~ ' bob ' Some cavaets : left hand side _must_ be a field like u . name right hand side _must not_ be a regular expression . Pattern matching is generally not supported by full text search engines
def not_regexp(left, right)
          raise if right.is_a? Regexp
          "NOT #{left}#{quotify right}"
        end
def not_regexp ( left , right ) raise if right . is_a? Regexp "NOT #{left}#{quotify right}" end
Handles generating an Ultrasphinx query for code like:
u.name !~ 'bob'
Handles generating an Ultrasphinx query for code like : u . name !~ ' bob '
# could be DRYer, but this is more readable than: "NOT #{self.=~(left,right)}"
left
<not_specific>
right
<not_specific>