yii\elasticsearch\BatchQueryResult::reset PHP Method

reset() public method

This method will clean up the existing batch query so that a new batch query can be performed.
public reset ( )
    public function reset()
    {
        if (isset($this->_lastScrollId)) {
            $this->query->createCommand($this->db)->clearScroll(['scroll_id' => $this->_lastScrollId]);
        }
        $this->_batch = null;
        $this->_value = null;
        $this->_key = null;
        $this->_lastScrollId = null;
    }