Module: Eson::Search::QueryGroup
- Includes:
- Filters, Parametrized, Queries
- Included in:
- BaseQuery, HasChild, Nested, SubQuery, TopChildren
- Defined in:
- lib/eson/search/query_group.rb
Instance Attribute Summary
Attributes included from Parametrized
Attributes included from Queries
Attributes included from Filters
Instance Method Summary collapse
Methods included from Parametrized
Methods included from Queries
Methods included from Filters
Instance Method Details
#to_hash ⇒ Object
29 30 31 |
# File 'lib/eson/search/query_group.rb', line 29 def to_hash to_query_hash end |
#to_query_hash ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/eson/search/query_group.rb', line 8 def to_query_hash if queries && filters && queries.any? && filters.any? hash = { :filtered => { :query => queries.to_query_hash, :filter => filters.to_query_hash } } else if filters && filters.any? hash = filters.to_query_hash end if queries && queries.any? hash = queries.to_query_hash end end hash end |