0
-module Ambition::Adapters::AmbitiousSphinx
0
- # Select is responsible for taking pure Ruby, and mangling it until it resembles
0
- # the syntax that Ultrasphinx[http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html] uses.
0
- # Handles method calls, like
0
+ module AmbitiousSphinx
0
+ # Select is responsible for taking pure Ruby, and mangling it until it resembles
0
+ # the syntax that Ultrasphinx[http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html] uses.
0
+ # Handles method calls, like
0
- # Should we be supporting chained calls like:
0
- # I don't think Sphinx would be able to handle this.
0
- def chained_call(*methods)
0
- raise "Not implemented yet."
0
+ # Should we be supporting chained calls like:
0
+ # I don't think Sphinx would be able to handle this.
0
+ def chained_call(*methods)
0
+ raise "Not implemented yet."
0
- # Handles generating an Ultrasphinx query for code like:
0
- "#{quotify left} AND #{quotify right}"
0
+ # Handles generating an Ultrasphinx query for code like:
0
+ "#{quotify left} AND #{quotify right}"
0
- # Handles generating an Ultrasphinx query for code like:
0
- def either(left, right)
0
- "#{quotify left} OR #{quotify right}"
0
+ # Handles generating an Ultrasphinx query for code like:
0
+ def either(left, right)
0
+ "#{quotify left} OR #{quotify right}"
0
- # Sphinx doesn't support equality.
0
- raise "Not applicable to sphinx."
0
+ # Sphinx doesn't support equality.
0
+ raise "Not applicable to sphinx."
0
- # Sphinx doesn't support inequality.
0
- def not_equal(left, right)
0
- raise "Not applicable to sphinx."
0
+ # Sphinx doesn't support inequality.
0
+ def not_equal(left, right)
0
+ raise "Not applicable to sphinx."
0
- # Handles generating an Ultrasphinx query for code like:
0
- # * left hand side _must_ be a field, like u.name
0
- # * right hand side _must not_ be a regular expression. Pattern matching is generally not
0
- # supported by full text search engines
0
- raise if right.is_a? Regexp
0
- "#{left}#{quotify right}"
0
+ # Handles generating an Ultrasphinx query for code like:
0
+ # * left hand side _must_ be a field, like u.name
0
+ # * right hand side _must not_ be a regular expression. Pattern matching is generally not
0
+ # supported by full text search engines
0
+ raise if right.is_a? Regexp
0
+ "#{left}#{quotify right}"
0
- # Handles generating an Ultrasphinx query for code like:
0
- # * left hand side _must_ be a field, like u.name
0
- # * right hand side _must not_ be a regular expression. Pattern matching is generally not
0
- # supported by full text search engines
0
- def not_regexp(left, right)
0
- # could be DRYer, but this is more readable than: "NOT #{self.=~(left,right)}"
0
- raise if right.is_a? Regexp
0
- "NOT #{left}#{quotify right}"
0
+ # Handles generating an Ultrasphinx query for code like:
0
+ # * left hand side _must_ be a field, like u.name
0
+ # * right hand side _must not_ be a regular expression. Pattern matching is generally not
0
+ # supported by full text search engines
0
+ def not_regexp(left, right)
0
+ # could be DRYer, but this is more readable than: "NOT #{self.=~(left,right)}"
0
+ raise if right.is_a? Regexp
0
+ "NOT #{left}#{quotify right}"
0
- # Not supported by Sphinx. If you need this kind of comparison, you probably should be
0
- # using ambitious-activerecord.
0
- raise "Not applicable to sphinx."
0
+ # Not supported by Sphinx. If you need this kind of comparison, you probably should be
0
+ # using ambitious-activerecord.
0
+ raise "Not applicable to sphinx."
0
- # Not supported by Sphinx. If you need this kind of comparison, you probably should be
0
- # using ambitious-activerecord.
0
- raise "Not applicable to sphinx."
0
+ # Not supported by Sphinx. If you need this kind of comparison, you probably should be
0
+ # using ambitious-activerecord.
0
+ raise "Not applicable to sphinx."
0
- # Not supported by Sphinx. If you need this kind of comparison, you probably should be
0
- # using ambitious-activerecord.
0
- raise "Not applicable to sphinx."
0
+ # Not supported by Sphinx. If you need this kind of comparison, you probably should be
0
+ # using ambitious-activerecord.
0
+ raise "Not applicable to sphinx."
0
- # Not supported by Sphinx. If you need this kind of comparison, you probably should be
0
- # using ambitious-activerecord.
0
- raise "Not applicable to sphinx."
0
+ # Not supported by Sphinx. If you need this kind of comparison, you probably should be
0
+ # using ambitious-activerecord.
0
+ raise "Not applicable to sphinx."
0
- # Not supported by Sphinx. If you need this kind of comparison, you probably should be
0
- # using ambitious-activerecord.
0
- def include?(left, right)
0
- raise "Not applicable to sphinx."
0
+ # Not supported by Sphinx. If you need this kind of comparison, you probably should be
0
+ # using ambitious-activerecord.
0
+ def include?(left, right)
0
+ raise "Not applicable to sphinx."
Comments
No one has commented yet.