We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b9c671 commit c42d689Copy full SHA for c42d689
1 file changed
Classes/Eel/ElasticSearchQueryBuilder.php
@@ -728,7 +728,10 @@ protected function convertHitsToNodes(array $hits)
728
* we might be able to use https://github.com/elasticsearch/elasticsearch/issues/3300 as soon as it is merged.
729
*/
730
foreach ($hits['hits'] as $hit) {
731
- $nodePath = current($hit['fields']['__path']);
+ $nodePath = $hit[isset($hit['fields']) ? 'fields' : '_source']['__path'];
732
+ if (is_array($nodePath)) {
733
+ $nodePath = current($nodePath);
734
+ }
735
$node = $this->contextNode->getNode($nodePath);
736
if ($node instanceof NodeInterface && !isset($nodes[$node->getIdentifier()])) {
737
$nodes[$node->getIdentifier()] = $node;
0 commit comments