Skip to content

Commit 9075eb2

Browse files
committed
TASK: Merge branch '3.0' into 4.0
2 parents c5514d1 + 4516b32 commit 9075eb2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Classes/Driver/Version5/IndexerDriver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public function document($indexName, NodeInterface $node, ElasticSearchDocument
4646
'script' => [
4747
'lang' => 'painless',
4848
'inline' => '
49-
HashMap fulltext = (ctx._source.containsKey("__fulltext") ? ctx._source.__fulltext : new HashMap());
50-
HashMap fulltextParts = (ctx._source.containsKey("__fulltextParts") ? ctx._source.__fulltextParts : new HashMap());
49+
HashMap fulltext = (ctx._source.containsKey("__fulltext") && ctx._source.__fulltext instanceof Map ? ctx._source.__fulltext : new HashMap());
50+
HashMap fulltextParts = (ctx._source.containsKey("__fulltextParts") && ctx._source.__fulltextParts instanceof Map ? ctx._source.__fulltextParts : new HashMap());
5151
ctx._source = params.newData;
5252
ctx._source.__fulltext = fulltext;
5353
ctx._source.__fulltextParts = fulltextParts',
@@ -122,7 +122,7 @@ public function fulltext(NodeInterface $node, array $fulltextIndexOfNode, $targe
122122
'lang' => 'painless',
123123
'inline' => '
124124
ctx._source.__fulltext = new HashMap();
125-
if (!ctx._source.containsKey("__fulltextParts")) {
125+
if (!ctx._source.containsKey("__fulltextParts") || !(ctx._source.__fulltextParts instanceof Map)) {
126126
ctx._source.__fulltextParts = new HashMap();
127127
}
128128

0 commit comments

Comments
 (0)