public function flush()
    {
        if (!empty($this->documents)) {
            $this->resource->addDocuments($this->storeId, $this->documents);
            $this->clearDocuments();
        }
    }
public function flush()
    {
        if (!empty($this->documents)) {
            $this->resource->addDocuments($this->storeId, $this->documents);
            $this->clearDocuments();
        }
    }
public function flush ( ) { if ( ! empty ( $ this -> documents ) ) { $ this -> resource -> addDocuments ( $ this -> storeId , $ this -> documents ) ; $ this -> clearDocuments ( ) ; } }
Commit previously added documents to Solr and clear queue

@return void
Commit previously added documents to Solr and clear queue