src/Relationship/HasManyRelationship.php
public function save($child)
    {
        /** @var ElasticsearchModel[] $children */
        $children = !is_array($child) ? [$child] : $child;
        // @TODO: use bulk if count($children) > 1
        foreach ($children as $child) {
            $child->setParent($this->parent);
            $child->save();
        }
    }
public function save($child)
    {
        /** @var ElasticsearchModel[] $children */
        $children = !is_array($child) ? [$child] : $child;
        // @TODO: use bulk if count($children) > 1
        foreach ($children as $child) {
            $child->setParent($this->parent);
            $child->save();
        }
    }
Save children.

@param ElasticsearchModel|ElasticsearchModel[] $child