From 9af03c9a30cd07eef64e62866ab63f38ac99d4b4 Mon Sep 17 00:00:00 2001 From: Thomas Ender Date: Tue, 6 Aug 2024 16:23:34 +0200 Subject: [PATCH] setParams from dataObject->getParams in dodPopulateIndex --- src/Command/DoPopulateIndex.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Command/DoPopulateIndex.php b/src/Command/DoPopulateIndex.php index 500bbdf..17c3c7d 100644 --- a/src/Command/DoPopulateIndex.php +++ b/src/Command/DoPopulateIndex.php @@ -126,7 +126,17 @@ private function doPopulateIndex( } $progressBar->advance(); - $esDocuments[] = $this->documentHelper->elementToDocument($documentInstance, $dataObject); + $esDocument = $this->documentHelper->elementToDocument($documentInstance, $dataObject); + + $params = $dataObject->getParams() ?? []; + + if ($params !== []) { + foreach ($params as $key => $value) { + $esDocument->setParam($key, $value); + } + } + + $esDocuments[] = $esDocument; } catch (\Throwable $throwable) { $this->displayDocumentError($indexConfig, $document, $dataObject, $throwable);