first commit
This commit is contained in:
@@ -15,8 +15,8 @@ namespace WapplerSystems\Meilisearch\Controller;
|
||||
*/
|
||||
|
||||
use WapplerSystems\Meilisearch\Domain\Search\ResultSet\SearchResultSet;
|
||||
use WapplerSystems\Meilisearch\System\Logging\SolrLogManager;
|
||||
use WapplerSystems\Meilisearch\System\Solr\SolrUnavailableException;
|
||||
use WapplerSystems\Meilisearch\System\Logging\MeilisearchLogManager;
|
||||
use WapplerSystems\Meilisearch\System\Meilisearch\MeilisearchUnavailableException;
|
||||
use WapplerSystems\Meilisearch\Util;
|
||||
use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
|
||||
use TYPO3\CMS\Extbase\Mvc\Web\Response;
|
||||
@@ -115,8 +115,8 @@ class SearchController extends AbstractBaseController
|
||||
$values = $this->emitActionSignal(__CLASS__, __FUNCTION__, [$values]);
|
||||
|
||||
$this->view->assignMultiple($values);
|
||||
} catch (SolrUnavailableException $e) {
|
||||
$this->handleSolrUnavailable();
|
||||
} catch (MeilisearchUnavailableException $e) {
|
||||
$this->handleMeilisearchUnavailable();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ class SearchController extends AbstractBaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* This action allows to render a detailView with data from solr.
|
||||
* This action allows to render a detailView with data from meilisearch.
|
||||
*
|
||||
* @param string $documentId
|
||||
*/
|
||||
@@ -170,8 +170,8 @@ class SearchController extends AbstractBaseController
|
||||
try {
|
||||
$document = $this->searchService->getDocumentById($documentId);
|
||||
$this->view->assign('document', $document);
|
||||
} catch (SolrUnavailableException $e) {
|
||||
$this->handleSolrUnavailable();
|
||||
} catch (MeilisearchUnavailableException $e) {
|
||||
$this->handleMeilisearchUnavailable();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ class SearchController extends AbstractBaseController
|
||||
* Rendered when no search is available.
|
||||
* @return string
|
||||
*/
|
||||
public function solrNotAvailableAction()
|
||||
public function meilisearchNotAvailableAction()
|
||||
{
|
||||
if ($this->response instanceof Response) {
|
||||
$this->response->setStatus(503);
|
||||
@@ -187,14 +187,14 @@ class SearchController extends AbstractBaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the solr server is unavailable.
|
||||
* Called when the meilisearch server is unavailable.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function handleSolrUnavailable()
|
||||
protected function handleMeilisearchUnavailable()
|
||||
{
|
||||
parent::handleSolrUnavailable();
|
||||
$this->forward('solrNotAvailable');
|
||||
parent::handleMeilisearchUnavailable();
|
||||
$this->forward('meilisearchNotAvailable');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user