Class: Druid::SearchFilter

Inherits:
Filter
  • Object
show all
Includes:
BooleanOperators
Defined in:
lib/druid/filter.rb

Instance Attribute Summary

Attributes inherited from Filter

#dimension, #field, #fields, #function, #pattern, #type, #value

Instance Method Summary collapse

Methods included from BooleanOperators

#!, #&, #|

Methods inherited from Filter

#as_json, #method_missing

Constructor Details

#initialize(dimension, params) ⇒ SearchFilter

Returns a new instance of SearchFilter.



331
332
333
334
335
336
337
338
339
340
# File 'lib/druid/filter.rb', line 331

def initialize(dimension, params)
  super()
  @type = 'search'
  @dimension = dimension
  @query = {
    type: 'contains',
    value: params[:value],
    caseSensitive: params[:case_sensitive] || false
  }
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Druid::Filter