Class: EagleSearch::Interpreter::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/eagle_search/interpreter/filter.rb

Constant Summary collapse

LOGICAL_OPERATORS =
{ and: :must, not: :must_not, or: :should }

Instance Method Summary collapse

Constructor Details

#initialize(filters) ⇒ Filter

Returns a new instance of Filter.



5
6
7
# File 'lib/eagle_search/interpreter/filter.rb', line 5

def initialize(filters)
  @filters = filters
end

Instance Method Details

#payloadObject



9
10
11
# File 'lib/eagle_search/interpreter/filter.rb', line 9

def payload
  @payload ||= generate_payload(@filters)
end