From 5a69292f08c59ccc71be4f70ea7a73474503a989 Mon Sep 17 00:00:00 2001 From: Paavo Schmid Date: Tue, 10 Feb 2026 10:18:18 +0100 Subject: [PATCH] BUGFIX: Bypass async queue during bulk index builds When indexNamePostfix is set (during nodeindex:build), index and remove nodes directly via parent methods instead of queuing async jobs. This ensures bulk builds index synchronously into the correct postfixed index. Related: Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor#424 --- Classes/Indexer/NodeIndexer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Classes/Indexer/NodeIndexer.php b/Classes/Indexer/NodeIndexer.php index 2434cd2..95a402c 100644 --- a/Classes/Indexer/NodeIndexer.php +++ b/Classes/Indexer/NodeIndexer.php @@ -58,7 +58,8 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null): voi $this->removeNode($node, $targetWorkspaceName); return; } - if ($this->enableLiveAsyncIndexing !== true) { + // During bulk builds (postfix is set), always index directly to avoid async queuing + if ($this->enableLiveAsyncIndexing !== true || $this->indexNamePostfix !== '') { parent::indexNode($node, $targetWorkspaceName); return; @@ -88,7 +89,8 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null): voi */ public function removeNode(NodeInterface $node, string $targetWorkspaceName = null): void { - if ($this->enableLiveAsyncIndexing !== true) { + // During bulk builds (postfix is set), always remove directly to avoid async queuing + if ($this->enableLiveAsyncIndexing !== true || $this->indexNamePostfix !== '') { parent::removeNode($node, $targetWorkspaceName); return;