Class: Lycra::Search::Filters
- Inherits:
-
Array
- Object
- Array
- Lycra::Search::Filters
- Defined in:
- lib/lycra/search/filters.rb
Instance Method Summary collapse
- #to_query ⇒ Object (also: #to_q)
Instance Method Details
#to_query ⇒ Object Also known as: to_q
4 5 6 7 8 9 10 11 |
# File 'lib/lycra/search/filters.rb', line 4 def to_query return {} if empty? filters = {} filters.merge!(must_filters) unless must_filters.empty? filters.merge!(must_not_filters) unless must_not_filters.empty? {bool: filters} end |