ActiveRecord::Query#compare allows simple term comparison for queries.