class Arelastic::Queries::Regexp

Implements support for the Regexp filter.

Does not support Ruby `Regexp` objects, because Elasticsearch's regular expression syntax only supports a subset of the operators usually implemented in a fully-featured regex engine.

Reference: www.elastic.co/guide/en/elasticsearch/reference/1.7/query-dsl-regexp-filter.html

Public Class Methods

new(field, value, options = {}) click to toggle source
Calls superclass method
# File lib/arelastic/queries/regexp.rb, line 15
def initialize(field, value, options = {})
  if value.is_a?(::Regexp)
    raise TypeError.new('Regexp objects are not allowed to be Regexp filter values')
  end

  super
end