File tree Expand file tree Collapse file tree
Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Eel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -359,7 +359,14 @@ public function execute() {
359359 * we might be able to use https://github.com/elasticsearch/elasticsearch/issues/3300 as soon as it is merged.
360360 */
361361 foreach ($ hits ['hits ' ] as $ hit ) {
362- $ node = $ this ->contextNode ->getNode ($ hit ['fields ' ]['__path ' ]);
362+ // with ElasticSearch 1.0 fields always returns an array,
363+ // see https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor/issues/17
364+ if (is_array ($ hit ['fields ' ]['__path ' ])) {
365+ $ nodePath = current ($ hit ['fields ' ]['__path ' ]);
366+ } else {
367+ $ nodePath = $ hit ['fields ' ]['__path ' ];
368+ }
369+ $ node = $ this ->contextNode ->getNode ($ nodePath );
363370 if ($ node instanceof NodeInterface) {
364371 $ nodes [$ node ->getIdentifier ()] = $ node ;
365372 if ($ this ->limit > 0 && count ($ nodes ) >= $ this ->limit ) {
You can’t perform that action at this time.
0 commit comments