code: public function getAllDocuments()
      {
          $matchAllQuery = new MatchAllQuery();
          $search = $this->repository
              ->createSearch()
              ->addQuery($matchAllQuery)
              ->setScroll($this->getScrollSetting())
              ->setSearchType('scan');
          $documents = $this->repository->execute($search);
  
          return $documents;
      }
docs: Gets all documents by given type.
  
  @return DocumentIterator