EventListener/ImportSourceEventListener.php
public function getAllDocuments()
    {
        return new DoctrineImportIterator(
            $this->getDoctrineManager()->createQuery("SELECT e FROM {$this->getentityClass()} e")->iterate(),
            $this->getDoctrineManager(),
            $this->getElasticsearchManager()->getRepository($this->getDocumentClass())
        );
    }
public function getAllDocuments()
    {
        return new DoctrineImportIterator(
            $this->getDoctrineManager()->createQuery("SELECT e FROM {$this->getentityClass()} e")->iterate(),
            $this->getDoctrineManager(),
            $this->getElasticsearchManager()->getRepository($this->getDocumentClass())
        );
    }
Gets all documents by given type.

@return DoctrineImportIterator