Skip to content

Commit c4c2000

Browse files
author
Bernhard Schmitt
committed
Adjust to new API
1 parent cf93a05 commit c4c2000

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Classes/Indexer/NodeIndexer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function indexGraphNode(Node $dataNode): void
204204
$occupiedDimensionSpacePoints = $this->collectOccupiedDimensionSpacePointsForFulltextRoot($dataNode, $occupiedDimensionSpacePoints);
205205
}
206206

207-
$mappingType = $this->getIndex()->findType($this->nodeTypeMappingBuilder->convertNodeTypeNameToMappingName($dataNode->getNodeType()));
207+
$mappingType = $this->getIndex()->findType($dataNode->getNodeType()->getName());
208208
foreach ($occupiedDimensionSpacePoints as $occupiedDimensionSpacePoint) {
209209
$matchingSubgraph = $this->contentGraph->getSubgraphByIdentifier(
210210
ContentStreamIdentifier::fromString($occupiedDimensionSpacePoint->getCoordinate(new ContentDimensionIdentifier(LegacyConfigurationAndWorkspaceBasedContentDimensionSource::WORKSPACE_DIMENSION_IDENTIFIER))),
@@ -360,7 +360,7 @@ public function flush(): void
360360
$response = $this->requestDriver->bulk($this->getIndex(), $content);
361361
foreach ($response as $responseLine) {
362362
if (isset($response['errors']) && $response['errors'] !== false) {
363-
$this->logger->error('Indexing Error: Error during bulk request - ' . $responseLine);
363+
$this->logger->error('Indexing Error: Error during bulk request - ' . json_encode($responseLine));
364364
}
365365
}
366366
}

Classes/NodeAggregate/LegacyNodeAdapter.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function setIndex($index): void
212212
$this->handleLegacyOperation();
213213
}
214214

215-
public function getIndex(): int
215+
public function getIndex(): ?int
216216
{
217217
return $this->node->getIndex();
218218
}
@@ -513,4 +513,9 @@ public function equals(TraversableNodeInterface $other): bool
513513
{
514514
return $this->node->equals($other);
515515
}
516+
517+
public function __toString(): string
518+
{
519+
return 'Node ' . $this->getContextPath() . '[' . $this->getNodeType()->getName() . ']';
520+
}
516521
}

0 commit comments

Comments
 (0)