zwischenstand
This commit is contained in:
@@ -24,6 +24,7 @@ namespace WapplerSystems\Meilisearch\IndexQueue;
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
use TYPO3\CMS\Core\Utility\DebugUtility;
|
||||
use WapplerSystems\Meilisearch\ConnectionManager;
|
||||
use WapplerSystems\Meilisearch\Domain\Search\MeilisearchDocument\Builder;
|
||||
use WapplerSystems\Meilisearch\FieldProcessor\Service;
|
||||
@@ -145,11 +146,13 @@ class Indexer extends AbstractIndexer
|
||||
$this->type = $item->getType();
|
||||
$this->setLogging($item);
|
||||
|
||||
$meilisearchConnections = $this->getMeilisearchConnectionByItem($item);
|
||||
foreach ($meilisearchConnections as $systemLanguageUid => $meilisearchConnection) {
|
||||
$this->meilisearch = $meilisearchConnection;
|
||||
$this->meilisearch = $this->getMeilisearchConnectionByItem($item);
|
||||
|
||||
if (!$this->indexItem($item, $systemLanguageUid)) {
|
||||
$languages = $item->getSite()->getSite()->getLanguages();
|
||||
|
||||
foreach ($languages as $language) {
|
||||
|
||||
if (!$this->indexItem($item, $language->getLanguageId())) {
|
||||
/*
|
||||
* A single language voting for "not indexed" should make the whole
|
||||
* item count as being not indexed, even if all other languages are
|
||||
@@ -511,7 +514,7 @@ class Indexer extends AbstractIndexer
|
||||
* for translations of an item.
|
||||
*
|
||||
* @param Item $item An index queue item
|
||||
* @return array An array of WapplerSystems\Meilisearch\System\Meilisearch\MeilisearchConnection connections, the array's keys are the sys_language_uid of the language of the connection
|
||||
* @return \WapplerSystems\Meilisearch\System\Meilisearch\MeilisearchConnection
|
||||
*/
|
||||
protected function getMeilisearchConnectionByItem(Item $item)
|
||||
{
|
||||
@@ -525,7 +528,7 @@ class Indexer extends AbstractIndexer
|
||||
|
||||
// Meilisearch configurations possible for this item
|
||||
$site = $item->getSite();
|
||||
return $site->getMeilisearchConnectionConfiguration();
|
||||
return $this->connectionManager->getConnectionBySite($site);
|
||||
|
||||
|
||||
$defaultLanguageUid = $this->getDefaultLanguageUid($item, $site->getRootPage(), $siteLanguages);
|
||||
|
Reference in New Issue
Block a user