Method: Elasticquery::Query#<<
- Defined in:
- lib/elasticquery/query.rb
#<<(filter) ⇒ Object
Merge filter to query. If current query is ‘matche_all`ed then clear it and use new value. Populate #filters array with given classes
44 45 46 47 48 |
# File 'lib/elasticquery/query.rb', line 44 def <<(filter) @query = {} if match_all? merge filter @filters << filter end |