Skip to content

Commit

Permalink
Merge branch '1.2' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lukmzig committed Nov 14, 2024
2 parents bee02be + e8129cc commit 8454596
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Service/Search/SearchService/IndexNameResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\AssetTypeAdapter;
use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\DataObjectTypeAdapter;
use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\DocumentTypeAdapter;
use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface;

/**
* @internal
Expand All @@ -36,6 +37,7 @@ public function __construct(
private AssetTypeAdapter $assetTypeAdapter,
private DataObjectTypeAdapter $dataObjectTypeAdapter,
private DocumentTypeAdapter $documentTypeAdapter,
private SearchIndexConfigServiceInterface $searchIndexConfigService
) {
}

Expand All @@ -56,7 +58,7 @@ public function resolveIndexName(SearchInterface $search): string
}

if ($search instanceof ElementSearch) {
return IndexName::ELEMENT_SEARCH->value;
return $this->searchIndexConfigService->getIndexName(IndexName::ELEMENT_SEARCH->value);
}

throw new InvalidArgumentException('Unsupported search type: ' . get_class($search));
Expand Down

0 comments on commit 8454596

Please sign in to comment.