Class: GroongaDelta::Mapping::ExpressionEvaluator::Context

Inherits:
BasicObject
Defined in:
lib/groonga-delta/mapping.rb

Instance Method Summary collapse

Instance Method Details

#groonga_escape_query(text) ⇒ Object



299
300
301
302
303
304
305
306
307
308
# File 'lib/groonga-delta/mapping.rb', line 299

def groonga_escape_query(text)
  case text
  when /[+\-><~*()"\\: ]/
    "\"#{text.gsub("\"", "\\\"")}\""
  when "OR"
    "\"OR\""
  else
    text
  end
end

#html_untag(text) ⇒ Object



295
296
297
# File 'lib/groonga-delta/mapping.rb', line 295

def html_untag(text)
  text.gsub(/<.*?>/, "")
end