Method: Elastictastic::ChildCollectionProxy#initialize
- Defined in:
- lib/elastictastic/child_collection_proxy.rb
#initialize(association, parent) ⇒ ChildCollectionProxy
Returns a new instance of ChildCollectionProxy.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/elastictastic/child_collection_proxy.rb', line 5 def initialize(association, parent) super( parent.index, association.clazz, Search.new( 'query' => { 'constant_score' => { 'filter' => { 'term' => { '_parent' => parent.id }} } } ), self ) @parent = parent @transient_children = [] end |