module ThinkingSphinx::SphinxQL
  mattr_accessor :weight, :group_by, :count

  def self.functions!
    self.weight   = 'weight()'
    self.group_by = 'groupby()'
    self.count    = 'count(*)'
  end

  def self.variables!
    self.weight   = '@weight'
    self.group_by = '@groupby'
    self.count    = '@count'
  end

  self.variables!
end

module ThinkingSphinx::SphinxQL
  mattr_accessor :weight, :group_by, :count

  def self.functions!
    self.weight   = 'weight()'
    self.group_by = 'groupby()'
    self.count    = 'count(*)'
  end

  def self.variables!
    self.weight   = '@weight'
    self.group_by = '@groupby'
    self.count    = '@count'
  end

  self.functions!
end

Use Sphinx 2.1.x functions instead of variables by default.
Use Sphinx 2.1.x functions instead of variables by default.

This can be changed back to the old behaviour by putting this call in an initialiser: ThinkingSphinx::SphinxQL.variables!
