Class: Arelastic::Queries::Regexp
- Inherits:
-
Query
- Object
- Nodes::Node
- Query
- Arelastic::Queries::Regexp
- Defined in:
- lib/arelastic/queries/regexp.rb
Overview
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
Instance Method Summary collapse
-
#initialize(field, value, options = {}) ⇒ Regexp
constructor
A new instance of Regexp.
Methods inherited from Query
Methods inherited from Nodes::Node
#==, #convert_to_elastic, #read_option!
Methods included from Arities::Binary
Methods included from Arities::Polyadic
Methods included from Arities::Unary
Constructor Details
#initialize(field, value, options = {}) ⇒ Regexp
Returns a new instance of Regexp.
15 16 17 18 19 20 21 |
# File 'lib/arelastic/queries/regexp.rb', line 15 def initialize(field, value, = {}) if value.is_a?(::Regexp) raise TypeError.new('Regexp objects are not allowed to be Regexp filter values') end super end |