Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Classes/Command/NodeIndexCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception\RuntimeException;
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Indexer\NodeIndexer;
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Indexer\WorkspaceIndexer;
use Neos\ContentRepository\Search\Indexer\NodeIndexerInterface;
use Flowpack\ElasticSearch\Domain\Model\Mapping;
use Flowpack\ElasticSearch\Transfer\Exception\ApiException;
use Neos\ContentRepository\Domain\Model\Workspace;
Expand Down Expand Up @@ -145,6 +146,12 @@ class NodeIndexCommandController extends CommandController
*/
protected $indexDriver;

/**
* @Flow\Inject
* @var NodeIndexerInterface
*/
protected $nodeIndexerInterface;

/**
* Index a single node by the given identifier and workspace name
*
Expand Down Expand Up @@ -503,6 +510,13 @@ private function configureNodeIndexer(array $dimensionsValues, string $postfix):
{
$this->nodeIndexer->setIndexNamePostfix($postfix);
$this->nodeIndexer->setDimensions($dimensionsValues);

// Also configure the interface instance (separate singleton when QueueIndexer is installed)
if ($this->nodeIndexerInterface instanceof NodeIndexer && $this->nodeIndexerInterface !== $this->nodeIndexer) {
$this->nodeIndexerInterface->setIndexNamePostfix($postfix);
$this->nodeIndexerInterface->setDimensions($dimensionsValues);
}

return $dimensionsValues;
}

Expand Down