protected function resetIndex()
    {
        $this->db->createCommand([
            'index' => $this->index,
            'type' => $this->type,
            'queryParts' => ['query' => ['match_all' => new \stdClass()]],
        ])->deleteByQuery();
    }