Module: Caoutsearch::Search::Query::Nested
- Included in:
- Base
- Defined in:
- lib/caoutsearch/search/query/nested.rb
Instance Method Summary collapse
Instance Method Details
#nested_queries ⇒ Object
7 8 9 |
# File 'lib/caoutsearch/search/query/nested.rb', line 7 def nested_queries @nested_queries ||= {} end |
#nested_query(path) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/caoutsearch/search/query/nested.rb', line 11 def nested_query(path) nested_queries[path.to_s] ||= begin query = Caoutsearch::Search::Query::Base.new query[:path] = path.to_s filters << {nested: query} query end end |